Accessible web design: the basics every site should cover
The accessibility basics every small business site should cover, from headings and alt text to keyboard use, contrast and clear forms.
An accessible website is one that people can use regardless of how they see, hear, move or process information. That covers someone using a screen reader, someone who can't hold a mouse steady, someone with low vision or colour blindness, and someone who finds dense text hard to follow.
It also covers a lot of people you wouldn't think of as having a disability at all. A tradie reading your site in full sun. A parent with a baby on one arm and a phone in the other hand. Anyone whose glasses are in the other room. The basics below help all of them.
Why it deserves your attention
There are three plain reasons.
Customers. A meaningful share of the population lives with some form of disability, and the proportion rises with age. If your customers include older people, and most businesses' do, a hard to use website quietly turns some of them away.
Everyone benefits. Clear headings, readable text and simple forms make a site better for every visitor. Search engines also rely on much of the same structure to understand your pages.
Obligations. In Australia, anti discrimination law can apply to websites, and the commonly referenced standard is the Web Content Accessibility Guidelines, known as WCAG. Government and larger organisations often have specific requirements. For what applies to you, check the Australian Human Rights Commission's guidance or ask an adviser.
Structure: headings and alt text
Headings
A screen reader user often moves through a page by jumping from heading to heading, much as a sighted person skims. That only works if headings are real headings in the page's code, in a sensible order: one main heading for the page, then section headings, then subheadings beneath them.
The common mistake is choosing a heading level because of how big it looks, or making text bold and large without marking it as a heading at all. When you edit your own pages, pick heading levels by their place in the outline, never by size.
Alt text
Alt text is a short written description attached to an image. Screen readers read it aloud, and it appears if the image fails to load.
- Describe what matters about the image in a sentence. "Renovated bathroom with a walk in shower and timber vanity."
- Skip "image of" or "photo of". The software already announces that.
- If an image is purely decorative, it should have empty alt text so it is skipped.
- If an image contains words, such as a flyer or a price list, those words need to be in the alt text or, better, on the page as real text.
Keyboard use
Some people can't use a mouse or touchscreen. They move through a site with the Tab key, voice control or a switch device, all of which depend on the site working by keyboard.
Three things need to be true:
- Every link, button, menu and form field can be reached with the Tab key.
- You can always see where you are, thanks to a visible outline around the focused item. Designers sometimes remove this outline because they find it ugly. It should stay, or be replaced with something just as visible.
- Nothing traps you. If a pop up opens, you can close it with the keyboard and carry on.
Colour and contrast
Text needs to be clearly darker or lighter than its background. Pale grey text on white is the most common failure, followed by white text on a bright photo. WCAG sets minimum contrast ratios, and free contrast checkers will tell you in seconds whether a colour pair passes.
Just as important: never rely on colour alone to carry meaning. If a form marks errors only by turning a border red, someone who is colour blind may not notice. Add an icon or a text message. Links inside paragraphs should be underlined, not just a different colour.
Forms
Forms are where accessibility problems cost you directly, because a form someone can't complete is an enquiry you never receive.
- Every field needs a visible label. Placeholder text inside the box doesn't count, because it vanishes as soon as someone starts typing.
- Mark required fields clearly, in words, not only with a colour.
- Write error messages that explain the fix. "Please enter a phone number with ten digits" helps. "Invalid input" doesn't.
- Put the error next to the field it relates to, not only at the top of the page.
- Confirm success plainly. A clear message that the form was sent, in text.
A basic check you can do yourself
You can find most of the obvious problems in about fifteen minutes.
- Put the mouse aside and use the Tab key to move through your homepage. Can you reach everything, and can you always see where you are?
- Complete and send your contact form using only the keyboard.
- Zoom the browser in until everything is double its normal size. Does the page still work without scrolling sideways?
- Run your main text and button colours through a contrast checker.
- Look at your images. Do the meaningful ones have descriptions?
- Turn on the screen reader built into your phone and listen to your homepage for a minute. It is an eye opening exercise.
Write down what fails and send the list to whoever looks after your site. One caution: be wary of plug in widgets that promise instant compliance with a single line of code. They don't fix the underlying page, and they are no substitute for getting these basics right in the design.