Lessons · HTML and CSS · who a page can shut out
Who a page can shut out
Keyboard access is not a blindness feature: it is for anyone whose mouse hurts, is imprecise for them, or is not there.
Hone is a place to practise programming. This is one of its lessons, written out in full and free to read without an account.
What it is for
Around one in six people worldwide has a disability that affects how they use software, and the figure climbs with age -- so it eventually includes most people who live long enough.
How to think about it
Think about the limit, not the label. One arm in a sling, bright sun on a screen, a noisy room: the fix for the permanent case is what makes the temporary case bearable, and it is the version of this argument that survives a planning meeting.
Worked example
<button>Save</button>Reachable by keyboard, announced as a button, activated by Enter or Space. None of that had to be asked for.
<div class="btn" onclick="save()">Save</div>Looks identical. Reaches nobody who is not holding a mouse.
Your turn
The first thing to try on any page, before opening a checker.
put the mouse down and press
Write a page and watch it render
The trap
The most common reason this gets skipped is that the person writing the page can use it. That is not evidence about anybody else.