Accessible CSS — exercises and bug fixes
5 hands-on exercises and 5 find-the-bug challenges for the Accessible CSS lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.
Exercises(5)
- 1
Keep focus visible
easy10 minGive #link a 2px solid navy outline instead of removing it.
- 2
Offset the focus ring
easy10 minPush #link's outline 3px away from the element.
- 3
Give a large enough target
easy10 minMake #link at least 44px tall and show it as a block.
- 4
Do not rely on colour alone
easy10 minKeep #link underlined and make it bold, so it reads as a link without colour.
- 5
Use a readable contrast pair
medium10 min#1a1a1a text on #ffffff.
Find the bug(5)
- 1
Fix the removed focus ring
easy8 minRemoving the outline leaves keyboard users lost.
- 2
Fix the offset that does nothing
easy8 minAn offset needs an outline to push away.
- 3
Fix the tiny tap target
easy8 min44px is the smallest comfortable touch target.
- 4
Fix the colour-only link
easy8 minA link needs a cue beyond its colour.
- 5
Fix the low contrast
easy8 minLight grey on white is unreadable.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspace