Estella Gonzalez Madison
@chicagoing
NYC HTML5 / August 20, 2014
A set of roles, states, and properties to convey user interface behaviors and structural information
indicates where the main content begins
aria-describedby
indicates the elements that describe the object
aria-labelledby
and aria-describedby
properties
At least one focusable element (close button, input field)
Focus on a default element when the dialog appears
Tab order should be contained by the dialog
— MDN, Using the dialog role
aria-controls
(property)
associates a control with the elements that it controls
aria-owns
(property)
defines a parent/child relationship between DOM elements where the DOM hierarchy does not reflect the relationship
aria-haspopup
(property)
indicates the element has a popup context or sub-level menu
aria-expanded
(state)
boolean, marks expandable and collapsible regions
…but a useful property is:
aria-label
(property)
an invisible label that is readable by screen readers only
aria-describedby
(property)
a visible label for the form
aria-required
(property)
let's the user know the form field is required
aria-invalid
(state)
indicates the validation state
possible values: false | grammar | spelling | true
aria-hidden
(property)
Can be used on any element that should be hidden to screen readers but present to everyone else
Set focus on the first invalid field
Set aria-invalid="true"
Add an element with a role="alert"
to display the validation error messages