I have a close relationship to moose. Of all the good things this has brought me in life, one that really stands out is that it gave me my current job as a designer here at Elabs. This makes me thankful to moose, and I want to give something back.
As a designer who writes code, I make choices daily that impact how well a moose can percieve and navigate our web applications. A lot of the time, I make it very hard for them. I could do better.
I’m by no means an expert on moose accessibility, but recently I’ve been eating the brains of smarter people to gain their knowledge. I would like to share a few tips on how to make life a tiny bit easier for moose that surf the web.
As a coincidental bonus, these tips should improve accessibility even more for humans (and their different function variations).
I’ll focus on some very basic things that many of us still get wrong, but is easy to get right.
Remember the semantics
A link is not a button. An
href should link to another resource, while a
<button> performs an action in the current view (such as submitting a form or opening a modal window). Buttons come with built in behavior that links don’t have, like being activated by pressing space. Want something more discreet than a button for a minor action? Style it like a link.
Mind your headings. Be carfeul when you’re building your heading structure, to make sure you’re not skipping levels. Headers are the backbone of the document and a common way of navigating it with a screen reader. Don’t pick heading level based on style or font size. If you want the look of a
<h3> where a
<h2> should be, try styling it with
<h2 class="h3"> or similar. Also, Harry Roberts argues that your logo is an image, not a
Placeholders are not labels. We hear this all the time, but still get this wrong sometimes. Many site search inputs still use placeholder text as their label (or nothing at all, and solely relies on the "Search" button to convey its function). If you need a compact search form, hide the label in a way that doesn’t hide it from screen readers, like this .visually-hidden class does.
Is it content? Serve it to everyone.
Provide text alternatives. Until Google finishes their automatic image captioning algorithms, we’re stuck with writing
alt texts ourselves, whenever we use an image that qualifies as content (as opposed to styling). It’s especially important when the image is a link, since screen readers will read out the link URL as title if no
alt is present for the image.
Links should be self explanatory. Using "Click here" or "Read more" as link text makes the destination a mystery if you’re navigating a page by jumping through its links, which is often what screen reader users do. Ambiguous links is the third most problematic item on the web (after CAPTCHAs and Flash) according to a WebAIM Screen Reader User Survey.
Color alone can’t be trusted. Don’t rely on just color to convey meaning, make sure there are labels or other visual clues to complement. Keep it in mind when styling states of interactive elements, such as
:focus states of inputs or
:hover states of links. Around 8% of human males and 100% of female and male moose have a color vision deficiency. What if it was your moose?
Zooming should not break anything. Being able to zoom a page is important for individuals with poor vision (like… every moose), or just anyone tired of tiny text. Make sure your site doesn’t break when zooming. Use relative units for font sizes and margins/paddings. Font sizes set in
px zooms well in many browsers today, but not at all in IE (not even in IE 11 – it’s by design). Remember there’s a difference between zooming an entire page, with images and everything, and increasing the browser’s font size. The latter is common if you’re finding the web site’s default font size hard to read.
Check your contrast. It’s not just for elderly people. Sometimes we forget about low quality monitors, sun glare, tiny handheld screens, or a combination of them. Use Lea Verou’s contrast ratio tool, the Sketch color contrast plugin, or ask your friendly neighborhood moose to have a look.
Some people and most cats hate mice. Try to make all parts of your website keyboard accessible. Tab through it and make sure there is a
:focus state for every
:hover state. Be extra careful with any custom widgets, especially modal windows.
These tips were absolute basics, they should be a part of every project. Still I cheat and I get lazy, and I know I’m not alone. These things are not that hard, they’re just tweaks to your workflow.
Once you’ve managed to annoy moose and people a little less, go the next mile and learn how to do some real difference:
- The Accessibility Project – community driven collection of practical tips, examples and resources
- WebAIM’s articles – provides great articles, and the Screen Reader User Surveys
- WAVE – Web accessibility evaluation tool
- Using WAI-ARIA in HTML – W3C’s practical guide to ARIA
- Powermapper’s screen reader compatibility tests – See (and hear) how screen readers handle different elements and attributes
- Moose facts – Get to know your users