🖋️
Web Accessibility Resources
  • Web Accessibility
  • Cheat Sheets
    • Structure and Semantics
      • Page Title
      • Language
      • Headings
      • Landmarks
      • Lists
      • Tables
      • Iframes
      • Markup Validity
      • Other Semantic Elements
    • Links & Navigation
      • Links
      • Site Navigation
      • Within-Page Navigation
      • Reading Order/Focus Order
    • Images & Visual Design
      • Images
      • Color & Contrast
      • Text Styles, Resize, Reflow, and Zoom
      • Visual Cues
      • Adaptive and Responsive Output
    • Multimedia, Animations, and Motion
      • Audio and Video
      • Animation, Motion, and Timed Content
    • User Input, Forms, and Dynamic Content
      • Device-Independent User Input
      • Form Input, Labels, and Instructions
      • Form Validation and Feedback
      • Dynamic Content (JavaScript, AJAX)
      • Custom Widgets (JavaScript, ARIA)
      • CAPTCHA
    • Keyboard Commands
  • Semantic Group Labels
Powered by GitBook
On this page

Was this helpful?

  1. Cheat Sheets
  2. User Input, Forms, and Dynamic Content

Custom Widgets (JavaScript, ARIA)

Topic

Technique

WCAG AA Requirement

Name

Name of Interactive UI Elements: Every interactive UI element (e.g. links, buttons, controls for custom widgets, form inputs/elements) MUST have a name, according to the accessible name computation.Note: The name can come from the native text of the element (e.g. link text, <button> text), a value attribute (e.g. <input type="submit" value="Name goes here">), the aria-label text, the text referred to via the aria-labelledby ID value, or other attributes, such as title (depending on context).

  • Headings (or elements with role="heading")

  • Images (or elements with role="image")

  • Links (or elements with role="link"), via link text, aria-label (e.g. when the link contains only a background image), or aria-labelledby)

  • Frames, via the title attribute

  • Iframes, via the title attribute

  • Landmarks (HTML 5 or ARIA landmarks); Names are especially helpful when there are two of the same type of landmark on the same page, such as two navigation landmarks

  • Tables (via <caption>, aria-label, or aria-labelledby)

best practice

Role

Role Specified: The semantic meaning of elements MUST be communicated via appropriate native HTML element or ARIA role.

HTML versus ARIA Role: When an HTML element exists, the HTML element SHOULD be used instead of the equivalent ARIA role, whenever possible.

best practice

Value

Static ARIA Properties: Static ARIA properties (e.g. aria-valuemax), MUST be specified.

Static Non-ARIA Properties: Static non-ARIA properties MUST be specified in text (or alternative text).

Note: The static property may be included in the native text of an element, in its label, in associated text (e.g. via aria-describedby), in adjacent text, or in some other way that is available to assistive technologies.

Initial State: The initial state of a changeable UI element MUST be programmatically designated (e.g. via ARIA attributes such as aria-expanded="false", aria-selected="true", aria-sort="ascending", etc.)

ARIA State Changes: When the visual and/or functional state of an element changes (e.g. aria-valuenow, aria-pressed, aria-expanded, aria-checked), the ARIA state MUST be change accordingly.

Non-ARIA State Changes: If a state change cannot be communicated via a change in an ARIA attribute, when the state change is the result of a user action or request, the state change MUST be communicated to the user visually AND MUST be communicated to assistive technologies using a technique such as:

  • aria-live announcement

  • ARIA alert (inject text into a pre-existing container with role="alert")

  • Move keyboard focus to the announcement (warning: moving the focus can be disorienting, so should be used with caution)

Keyboard Focus Management During Interactions

Set Keyboard Focus: The focus MUST be purposely moved or set (via JavaScript) onto the appropriate element when the user's action requires a change of context or location for effective keyboard or touch interaction.

No Lost Focus: The focus MUST NOT become lost or reset to the top of the page, except when loading or re-loading a page.

Focus Target Has Text: When moving or setting focus, the destination element MUST contain discernible text (either standard text or programmatically-associated text).

Keyboard Conventions

best practice

Instructions

Instructions for Custom Widgets: Widgets with non-standard interaction models SHOULD have instructions explaining how to use them.

best practice

Required multiple

Custom Widgets

best practice

best practice

best practice

Autocomplete widgets SHOULD conform to WAI-ARIA Authoring Practices for Autocomplete widgets.

best practice

best practice

best practice

best practice

Carousel widgets (based on a Tab Panel) SHOULD conform to WAI-ARIA Authoring Practices for Tab Panels.

best practice

best practice

best practice

best practice

best practice

best practice

best practice

best practice

best practice

best practice

best practice

best practice

best practice

best practice

best practice

best practice

best practice

best practice

Progress Bar (Bounded) widgets SHOULD conform to WAI-ARIA Authoring Practices for Progress Bars.

best practice

Progress Bar (Unbounded) widgets SHOULD conform to WAI-ARIA Authoring Practices for Progress Bars.

best practice

best practice

best practice

best practice

best practice

best practice

best practice

best practice

Table (Sortable) widgets SHOULD be constructed of a standard HTML table, if possible, and make full use of ARIA sort attributes.

best practice

best practice

best practice

best practice

best practice

best practice

PreviousDynamic Content (JavaScript, AJAX)NextCAPTCHA

Last updated 5 years ago

Was this helpful?

Required

Name of Static Semantic Elements: The following semantic elements MUST have an accessible name, according to the :

Required

Other Semantic Elements Benefitting from a Name: Examples of other semantic elements that SHOULD have an accessible name, according to the include:

Required

Required

Required

Required

Required (WCAG 2.0) (WCAG 2.1)

Required (WCAG 2.0) (WCAG 2.1)

Required

Required

Required

See

See also the requirements for

Accordion widgets SHOULD conform to .

Alert widgets SHOULD conform to .

Alert Dialog widgets SHOULD conform to .

Breadcrumb widgets SHOULD conform to .

Button widgets SHOULD conform to .

Button (Toggle) SHOULD conform to .

Checkbox widgets SHOULD conform to .

Checkbox (Tri-State) widgets SHOULD conform to .

Combobox widgets SHOULD conform to .

Dialog (Simple Modal) widgets SHOULD conform to .

Dialog (Simple Alert Modal) widgets SHOULD conform to .

Dialog (Message Modal) widgets SHOULD conform to .

Dialog (Message Alert Modal) widgets SHOULD conform to .

Disclosure (Show/Hide or Expand/Collapse) widgets SHOULD conform to .

Disclosure (Based on Details/Summary) widgets SHOULD conform to .

Feed widgets SHOULD conform to .

Grid widgets (Interactive Tabular Data and Layout Containers) SHOULD conform to .

widgets SHOULD conform to .

Listbox widgets SHOULD conform to .

Menu widgets SHOULD conform to .

Menubar widgets SHOULD conform to .

Menu Button widgets SHOULD conform to .

Navigation (Hierarchical) widgets with Expand/Collapse widgets SHOULD conform to .

Radio and Radio Group widgets SHOULD conform to .

Slider widgets SHOULD conform to .

Slider (Multi-Thumb) widgets SHOULD conform to .

Spinbutton widgets SHOULD conform to .

Tab Panel widgets SHOULD conform to .

Table widgets SHOULD conform to .

Table (Responsive, Collapsible) widgets SHOULD maintain data relationships through , , and/or .

Toolbar widgets SHOULD conform to .

Tooltip widgets SHOULD conform to .

Tooltip Dialog widgets SHOULD conform to .

Tree View widgets SHOULD conform to .

Window Splitter widgets SHOULD conform to .

WCAG 4.1.2
accessible name computation
WCAG 4.1.2
accessible name computation
WCAG 4.1.2
WCAG 4.1.2
WCAG 4.1.2
WCAG 4.1.2
WCAG 4.1.2
WCAG 4.1.3
WCAG 4.1.2
WCAG 4.1.3
WCAG 2.4.3
WCAG 2.4.3
WCAG 1.3.1
https://www.w3.org/TR/wai-aria-practices-1.1/#keyboard
Form Input, Labels, and Instructions.
WAI-ARIA Authoring Practices for Accordions
WAI-ARIA Authoring Practices for Alerts
WAI-ARIA Authoring Practices for Alert Dialogs
WAI-ARIA Authoring Practices for Breadcrumbs
WAI-ARIA Authoring Practices for Buttons
WAI-ARIA Authoring Practices for Buttons
WAI-ARIA Authoring Practices for Checkboxes
WAI-ARIA Authoring Practices for Checkboxes
WAI-ARIA Authoring Practices for Comboboxes
WAI-ARIA Authoring Practices for Modal Dialogs
WAI-ARIA Authoring Practices for Modal Dialogs
WAI-ARIA Authoring Practices for Modal Dialogs
WAI-ARIA Authoring Practices for Modal Dialogs
WAI-ARIA Authoring Practices for Disclosures
WAI-ARIA Authoring Practices for Disclosures
WAI-ARIA Authoring Practices for Feeds
WAI-ARIA Authoring Practices for Grids
Link
WAI-ARIA Authoring Practices for Links
WAI-ARIA Authoring Practices for List Boxes
WAI-ARIA Authoring Practices for Menus
WAI-ARIA Authoring Practices for Menubars
WAI-ARIA Authoring Practices for Menu Buttons
WAI-ARIA Authoring Practices for Disclosures
WAI-ARIA Authoring Practices for Radio Groups
WAI-ARIA Authoring Practices for Sliders
WAI-ARIA Authoring Practices for Multi-Thumb Sliders
WAI-ARIA Authoring Practices for Spinbuttons
WAI-ARIA Authoring Practices for Tab Panels
WAI-ARIA Authoring Practices for Tables
table structure
list hierarchy
headings
WAI-ARIA Authoring Practices for Toolbars
WAI-ARIA Authoring Practices for Tooltips
WAI-ARIA Authoring Practices for Dialogs
WAI-ARIA Authoring Practices for Tree Views
WAI-ARIA Authoring Practices for Window Splitters