Accessibility
Learn how to ensure people of diverse abilities can use and interact with our digital products and tools.
Developers can reduce the time spent in manual testing by writing accessible code and using automated tools to check their work. Refer to VGAR to validate and iterate on work throughout the accessibility journey.
Doctype declaration
HTML doctype is a required preamble. Without a valid doctype declaration, browsers tend to use a different rendering mode (such as no-quirks mode, quirks mode, limited-quirks mode, etc.) that is incompatible with some specifications. The
Page title
The page
VGAR links (internal only)
Language
Identifying the language of a web page helps assistive technologies render text accurately. Provide the
VGAR links (internal only)
Hidden content
Content that may need to be hidden from sighted users, but not screen readers, must be moved off-screen using CSS.
Wrap this content in a
Content that may need to be hidden from both sighted and screen reader users should be removed from the DOM using CSS
VGAR links (internal only)
Structure and semantics
Headings are useful for organizing content into contextual sections, establishing content hierarchy, and enabling screen reader users to jump directly to specific content. They need to be defined with valid markup and structured in a proper nesting order to ensure assistive technologies can present them properly.
- Any text element which conveys information through its visual presentation style must be indicated semantically in code. This includes text styling such as strong, cite, blockquote, sub, and sup, and any other text style which carries secondary meaning.
- Paragraphs must be marked up as paragraphs.
- Groups of items, such as a navigation menu or group of tabs, must be marked up as a list.
To ensure that assistive technologies encounter the content in the same order as the logical presentation of the content, it should be structured in a logical order in the HTML code. Do not use CSS to order content. Additionally, any content that is not shown until a specific time or event should be removed from the DOM or parked at the bottom of the DOM.
VGAR links (internal only)
Forms and controls
Ensure that assistive technologies (AT) can gather information on, activate (or set), and update the status of user interface controls in the content.
Form controls that use a label to identify them must have only one label programmatically associated with them.
- Use
, , or for for this label.
Communicate required controls in text either at the beginning of the form or in-line.
- Use the
attribute.
Groups of checkboxes should indicate the required state in text either at the beginning of the form by stating all fields are required, or in the group’s
- Do not use the
attribute.
Helper text must be programmatically associated with a form control.
- Use
.
If there are multiple pagination controls on a page, they must have unique labels but still contain the word “Pagination”.
- Use
and .
VGAR links (internal only)
- Form Elements (INT-1)
- Form Interactions (INT-2)
- Name Consistently (NAV-4-2)
- Consistent or Unique Link Text (NAV-4-3)
- Pagination & Progress (NAV-5)
Error identification and suggestions
Controls being validated for errors must include
- Keyboard focus must be automatically set to the first invalid form control when an error is detected using validation after the user submits the form.
- When an error is detected using client-side validation, set
and add the ID of the error helper text container to the attribute.
When an error is detected using in-line validation, any previous
VGAR links (internal only)
System messages and navigation
System messages must include the
At minimum, the page must have a
- If a page has multiple landmarks of the same type, such as main navigation and sub-navigation, those regions must have unique names applied using an appropriate naming technique. Do not include the landmark role type in the name.
VGAR links (internal only)
Dialogs
Modal dialog windows must have
Modal dialogs must have
Modal dialogs should have
Modal dialogs must have focus set to an appropriate location based on the content presented in the modal dialog.
- Modal dialog windows must trap focus inside the modal dialog.
- Dialogs must restore focus to their triggering element when the dialog is closed.
Modal dialogs must allow the user to move through the modal dialog’s focusable elements, “wrapping around” from bottom-to-top and top-to-bottom using the Tab Shift + Tab key and keyboard events.
Modal dialogs must prevent mouse-clicks that occur outside the modal dialog from having any effect on the modal dialog.
If a heading is used in a dialog, the first heading level must be
Dialog windows must have the Esc keyboard event set to close the dialog.
VGAR links (internal only)
Tables
Tables must never be used for layout purposes. Data tables must use proper table headers
Data tables must be identified for screen readers by including the “title” of the table in its
VGAR links (internal only)
Text alternatives
All non-text content must include text alternatives that provide equivalent information, context, and purpose to the user. Non-text content with
All decorative non-text that provides no contextual value or is already defined by surrounding content must be hidden from screen reader users. For
VGAR links (internal only)
Keyboard interaction
All functionality and content must be available via the keyboard only and should not require the specific timing of keystrokes. If keyboard focus is ever controlled by part of the UI, such as a PDF viewer or modal window, it must allow focus to return to the launching element and browser through keyboard commands only.
Keyboard users should be able to use the Tab key to navigate through the page in the same order as the visual presentation of the content. This tab order should be established by the HTML structure of the page. As the user moves through the page with the keyboard, a highly visible indication of keyboard focus should appear on each element as it receives focus.
Content that remains hidden until it becomes visible on mouse hover must also be shown when it receives keyboard focus and hidden again when focus is removed. Content that appears and disappears in coordination with keyboard focus or pointer hover—such as tooltips, sub-menus, and other non-modal popups—must be dismissable, hoverable, and persistent.
VGAR links (internal only)
Screen reader compatibility
All features and functionality must work with at least one screen reader per platform. Features and functionalities including but not limited to alerts, visual changes on the page, page titles, iframes (used for user interaction, but not system use), landmarks, headings, links etc., must be presented and read accurately by supported screen readers.