Advanced
Markup that serves everyone
A page is read by people who cannot see it, cannot use a mouse, or cannot hear audio. The markup decides whether those readers can follow it, and most of the fixes are small and specific: names, order, and alternatives.
What you will see
Announced as 'Open menu, button'. The empty alt stops the image being announced twice, which is the pairing to learn.
About 1 min of reading
Data Flow
The document carries the alternatives.
1
Write the reading order in HTML
↓
2
Name every control
↓
3
Give images their decision
↓
4
Check contrast and keyboard order
Examples
Alt text is a decision
An image that carries information needs those words in alt. An image that is decoration needs an empty alt so a reader is not told about something meaningless. Both answers are correct and both are choices.
Reading order is document order
A reader follows the order the elements appear, not the order they are painted. Reordering visually with CSS while leaving the source order wrong is the bug that makes a page confusing.
Controls need names
A button whose only label is an icon gives a reader the word 'button'. The accessible name is what is announced, and it belongs in the markup even when the design shows only an icon.