Embed custom code (e.g. CSS or HTML).
For developers only!
The DCT Help Team does not support third party code.
Last reviewed: October 5, 2023
Be sure to carefully test your code for major browsers (i.e. Firefox, Internet Explorer, Safari, Chrome) before uploading to the UBCMS. Poor coding may break your page unexpectedly.
When you use this component, your team commits to maintaining the security, accessibility, and stability of any linked site or code.
There are two tabs: HTML and Options. Click the wrench icon to configure these settings.
HTML filter -- This is not an 'off' switch. Read more below.
You may break your page unexpectedly and the Help Desk does not support custom code.
Be Sure to Select No jQuery Before Embedding Formstack Forms (or just use the Formstack component).
Consider how this custom code will display in smartphones and other small screen devices.
Consider how this custom code may impact page performance.
Write your custom HTML, CSS or JavaScript code or paste in the 'embed code' from a third party application.
Description: Enter a descriptive label for the component that will be shown on your page in Author (recommended).
HTML filter: This setting controls whether just simple HTML is allowed ('Filter HTML') or the entire block of code is active (Off). Simple HTML refers to tags like "<b>" that have no additional attributes ("<a href=...>" is NOT considered simple). Switching the component to Filter HTML will change "<a href=some-url alt="some-text>link</a>" to just "<a>link</a>".
Choose between:
Component handle - Choose to display the component's gray bar and descriptive label in Author (recommended).
Proceed with caution. These instructions may be dated.
Authors are responsible for any custom adjustments they make to their UBCMS pages. This includes code added using External Embed or HTML Snippet components, or introduced through page Properties.
Best practice: only a developer should modify the standard UBCMS code or styling, and any adjustments should be made thoughtfully, with regard for accessibility and long term maintenance.
Authors are responsible for any third party content that is hosted or linked from their UBCMS pages.
This includes applications such as Formstack forms and Google Maps, that are displayed using their own component, as well as entries from UB's Calendar of Events, and external content hosted using HTML Snippet or External Embed.
Best practice: for Formstack forms, avoid using the date picker and the 'other' option in dropdowns.
Best practice: for the HTML Snippet and External Embed, always run an accessibility test (e.g. using a browser extension), check its behavior in mobile, and consider how it may impact page performance in general.
Best practice: if your code relies on a 'div' or iframe to house its content on your page, it must have an identifying label, often coded as a 'aria-label' or sometimes a 'title', that assistive technology can see. Formstack produces a title automatically, although it is poorly worded, but other applications tend to skip this requirement so it must be added manually on your end.
If you have concerns that external vendor content is not accessible, please contact UB's Web Accessibility officer.
Accessibility includes the legibility of text on our pages. Font sizes and the contrast between text and background must be great enough that people with reduced eyesight can read the words.
The UBCMS system-wide fonts and our UB Brand colors are optimized to meet ADA and Web standards (more about our new brand palette).
Best practice: Please do not adjust our standard fonts or introduce new palettes using custom CSS.
Link text should describe where the link will take the user in a manner that is appropriate to the context on your page and also the target page. This is also true for images that act as links.
Best practice: Avoid meaningless standalone phrases like "click here", "see all" and "learn more".
Alternative text ('alt text') is a short, written description that describes the appearance, content and/or function of an image on a webpage. Adding alt text is a best practice for all your UBCMS images and is required for accessibility so users will understand what they are not seeing.
Purely decorative images (that do not convey content or have a function on the page) can instead be set as "This image does not require Alt text" in some components, which also nullifies alt text that was previously entered.
Alt text is required in these contexts:
* When the image is a link, starts an animation or video, or is a navigational element, alt text should indicate its function, not the image's content (i.e., "watch video ABC" and not "screenshot from video ABC"). Screen readers will treat this image as a standard link.
Alt text can be added to images in Assets. This is required for images that are then used in the Photo Gallery component, while it can also be used as an alternate source for Alt text in some components (e.g. the Photo setting 'Get Alt text from Assets').
Best practice:
Text Over Photo provides an accessible alternative to using images that have embedded text.
> Learn more about the Text Over Photo component.
The user should control carousels, slideshows and video, so they are not confused by unexpected behavior and to provide enough time for them to process each segment.
Best practice:
These recommendations are supported by default in UBCMS carousel, slideshow and video components. Please comply with this best practice if you embed external video or animations.
Examples of embedded feeds can be seen on the UB Social site.