8. Color and Instructions
Do not communicate errors or status using color alone. Pair color with text, an icon with an accessible name, or another clear indicator. Ensure text and controls have sufficient contrast.
9. Accessibility Testing
- Navigate the entire page with a keyboard.
- Check that form controls have accessible names.
- Inspect heading order and landmark structure.
- Test zoom and responsive layouts.
- Use an automated accessibility checker as a supplement, not a replacement, for manual testing.
Common Mistakes
- Using clickable div elements instead of native buttons or links.
- Leaving meaningful images without appropriate alt text.
- Using placeholders as the only form labels.
- Removing keyboard focus indicators.
- Using color alone to indicate an error.
Practice Exercises
- Convert a generic page layout into semantic landmarks.
- Add accessible labels to a registration form.
- Write suitable alt text for an instructional diagram.
- Navigate a website using only Tab, Shift+Tab, Enter and Space.
Revision Quiz
- Why should semantic HTML be preferred when appropriate?
- When is alt="" appropriate?
- Why is placeholder text not a full replacement for a label?
- Why should keyboard focus be visible?
- Should errors be communicated by color alone?
- Can an automated checker find every accessibility problem?
Answer Key and Explanations
- It communicates structure and purpose — Browsers and assistive technologies understand semantic elements.
- For decorative images — It prevents unnecessary announcements for images that add no information.
- It may disappear and does not reliably replace a persistent label — A label keeps the field's purpose clear.
- To show the current keyboard position — Users need to know which control will receive an action.
- No. Use additional text or other clear indicators.
- No. Automated testing must be supplemented with manual testing.