Chapter Twelve · Finish

Accessibility

Accessibility as one discipline: who the web is for and the standard that defines accessible, how assistive technology reads a page and where ARIA fits, the visual rules that can be measured, and three tests that tell you whether it all works.

Every chapter so far has built the accessible version of what it taught: alt text, landmarks, a visible focus ring, real buttons, labelled fields, messages a screen reader announces. Those habits were introduced one at a time, each where it arose. This chapter gathers them into one discipline, gives them the standard that professionals work to, and adds the pieces that only make sense once the whole site exists: measuring it and testing it.

Four topics. Who the web is for: the people with disabilities who use it, how they browse, and WCAG's four principles and three levels. How assistive technology reads a page through the accessibility tree, and why the first rule of ARIA is not to use it when an HTML element will do. The visual rules with numbers attached: contrast, colour, zoom, motion, target size and hidden focus. And three kinds of test, the keyboard, a screen reader and an automated checker, run on the site from start to finish.

WCAG's four principles, and where the site meets each one
Perceivable
Alt text on images, enough contrast, words as well as colour.
Operable
Works with a keyboard, with focus always visible.
Understandable
Labelled fields and error messages that say how to fix the problem.
Robust
Real elements: a button, a nav, a label, not a styled box.

Topics in This Chapter