Skip to content

Chapter 5 of 8

Common Widget Patterns

ARIA provides patterns for many common interactive widgets. The disclosure pattern pairs a button with aria-expanded (and often aria-controls pointing to the region's id) to control the visibility of a single content region; when the button is activated, screen readers announce "expanded" or "collapsed". The aria-haspopup attribute announces that activating an element opens a popup and can specify its kind: true, "menu", "listbox", "tree", "grid", or "dialog". The accordion pattern extends disclosure to a group of button headers, each controlling a region with role="region" and aria-labelledby pointing back to its header.

The tabs pattern uses a tablist container holding role="tab" elements with aria-controls pointing to their tabpanel and aria-selected indicating the active tab. Each tabpanel has role="tabpanel" and aria-labelledby pointing back to its tab. In a horizontal tablist, the Left and Right arrow keys move focus and selection between tabs, Home and End jump to the first and last tab, and Tab exits the tablist to the next focusable element on the page.

The ARIA menu pattern, with role="menu" containing role="menuitem" (or menuitemcheckbox/menuitemradio) children, is intended for application-style menus where arrow keys navigate items and Enter or Space activates them — not for site navigation. For site navigation, a `

    ` inside `
All chapters
  1. 1Foundations of Web Accessibility
  2. 2ARIA Fundamentals
  3. 3Keyboard Interaction and Focus
  4. 4Live Regions and Modal Dialogs
  5. 5Common Widget Patterns
  6. 6Forms, Buttons, and Controls
  7. 7Content Semantics and Structure
  8. 8Advanced Patterns and Practices

Drill it

Reading is not remembering. These come from the Accessibility Aria Patterns deck:

Q

What does the acronym "a11y" stand for in web development?

"a11y" is a numeronym for "accessibility" — 'a' + 11 letters + 'y'.

Q

What is the difference between web accessibility (a11y) and usability?

Accessibility means people with disabilities can perceive, understand, navigate, and interact with the web. Usability is the broader quality of a design being e...

Q

Which four disability categories does WCAG primarily address?

Visual, auditory, physical/motor, and cognitive/neurological disabilities.

Q

Name the three conformance levels defined by WCAG 2.1.

A (lowest), AA (mid), and AAA (highest).