ARIA Widget Patterns Flashcards
Vertically stacked set of interactive headings that each contain a title, content snippet, or thumbnail representing a section of content. (Sections With Show/Hide Functionality).
Accordion widget
- has role=”region” or section element
- uses aria-expanded and aria-controls
- panels should reference their headers with aria-labelledby
An element that displays a brief, important message in a way that attracts the user’s attention without interrupting the user’s task.
- Automatically announced by most screen readers, except if it is present on the page before load completes.
- In some operating systems, they may trigger a sound.
- MUST NOT affect keyboard focus.
Alert
- role=”alert” on div
- default aria-live setting is assertive
- default aria-atomic setting is true
modal dialog that interrupts the user’s workflow to communicate an important message and acquire a response.
Examples: action confirmation prompts, error message notifications
Alert Dialog
- role=”alertdialog” on div
- aria-modal=”true”
- use aria-labelledby and aria-describedby on the main div
list of links to the parent pages of the current page in hierarchical order
Breadcrumb
- role=”navigation” or nav element
- aria-label=”Breadcrumb”
- aria-current=”page” applied to the element that identifies the current page
A widget that enables users to trigger an action or event, such as submitting a form, opening a dialog, canceling an action, or performing a delete operation. Give the three types.
Button (role=”button” or button element)
- Standard Button
- Toggle Button - two state, has aria-pressed=”true” (label must not change)
- Menu Button - aria-haspopup=”menu” or “true” and is used in the larger menu pattern
Presents a set of items (slides) by sequentially displaying a subset of one or more slides. Give three types.
Carousel
- should be in role=region/section element or role=”group”
- should have aria-roledescription=”carousel”
- slides should have aria-roledescription=”slide” and have an accessible name
Types
- Basic: Has rotation, previous slide, and next slide controls but no slide picker controls.
- Tabbed: Has basic controls plus a single tab stop for slide picker controls implemented using the tabs pattern.
- Grouped: Has basic controls plus a series of tab stops in a group of slide picker controls where each control implements the button pattern. Because each slide selector button adds an element to the page tab sequence, this style is the least friendly for keyboard users.
A checkable input that has three possible values: true, false, or mixed. Give the two types.
Checkbox
- role=”checkbox” or semantic input type=”checkbox”
- each checkbox has a visible label that is programatically linked
- a checked box has a checked or aria-checked=”true” attribute
- a mixed-state box has aria-checked=”mixed”
Types
- Dual-state: Toggles between two choices – checked and not checked. ()
- Tri-state: Supports an additional third state known as partially checked (aria-checked=”mixed”).
A widget made up of two elements + 1 optional:
- Single line text box
- Pop-up element for helping users set the value of the textbox. May be as listbox, grid, tree, or dialog.
- Optional: graphical button indicating the availability of the popup that will display the popup
Combo Box
- role=”combobox”
- must own or contain element with role textbox or searchbox
- uses aria-expanded, aria-autocomplete, aria-controls
- may use aria-activedescendant for managing focus
- most common implementation is with listbox (aria-haspopup=”listbox”) - which has it’s own roles states, and properties
- A window overlaid on either the primary window or another window.
- Users cannot interact with content outside this when it is open. It is often visually obscured or dimmed, and attempts to interact with it may close it.
Dialog
- role=”dialog”
- aria-modal=”true”
- aria-labelledby visible modal title or aria-label
- optional: aria-describedby set to id of content that describes the primary purpose or message of the dialog.
- all elements required to operate the dialog are descendants of it.
- Button that controls visibility of a section of content.
- Often styled as a typical push button with a right-pointing arrow that turns down when pushed, and additional content is exposed.
Disclosure
- the element that shows and hides the content has role button.
- uses aria-expanded and aria-controls (the content) on the button
- A page section that loads new article elements as the user scrolls, dynamically
- is a structure, not a widget, so that AT will default to read/browse (if available).
- establishes a contract with AT concerning scroll interactions.
- is a new WAI-ARIA feature, introduced by WAI-ARIA 1.1
Feed
- role=”feed”
- visible label that is also accessible name
- aria-busy=”true” if content is loading
Article elements inside each have
- unique aria-labelledby name pointing to an element inside the content
- strongly recommended: aria-describedby pointing to content inside the article
- aria-posinset set to a # that represents its current position in the feed
- aria-setsize set to the total # of number of articles currently loaded, if undetermined, can be set to -1.
This widget
- is a container that enables navigation via directional keys such as arrow keys and home/end.
- is a composite widget, so it must always contain multiple focusable elements. Only one is included in the page tab sequence.
- is generic in nature, so offers a flexible way to add keyboard support, simple to complex.
- has movement described using “row” and “column,” but this does not imply visual presentation must be tabular.
Give two types
Grid
- role=”grid” - best used on a table element (otherwise all table children must have roles defined manually)
- may use aria-sort, aria-selected, aria-readonly
Types
- data grid: present tabular information, often using functions like editing/sorting/etc. advanced versions may include selection shortcuts.
- layout grid: can be used to organize sets of widgets, such as links, buttons, checkboxes, etc.
- Interactive reference to a resource.
- Target resource may be external or local (e.g. another page or another location within the same page)
Link
- role=”link” or < a > (strongly encouraged so context menu and modifier keys will work correctly)
- presents a list of options and allows a user to select one or more of them.
- may be single-select or multi-select
- may be partially or fully exposed or expand via popup
Listbox
- role=”listbox” or semantic select element
- choices inside are role=”option” or semantic option
- single select, selected option has aria-selected=”true”
- with multi-select, all options are aria-selected=”true” or “false”
- offers a set of choices to the user, such as a set of actions or functions
Menu
- role=”menu” or “menubar” (for horizontal bar menu)
- aria-orientation is used if orientation is not default (menu: vertical, menubar: horizontal)
- often activated by a Menu Button (see that pattern)
- must have children of role: menuitem, menuitemcheckbox, menuitemradio
- any parent menuitems have aria-haspopup (menu or true) and aria-expanded