Accessibility icon

Accessibility on the web

What is accessibility?

(A11Y)

Accessibility = no barriers

The inclusive practice of removing barriers the prevent interaction with, or access to, websites and services, by people (including people with disabilities)

1 in 5

people are disabled

Equality Act 2010

We have a legal requirement to provide equal access to people with disabilities

gov.uk/guidance/equality-act-2010-guidance

Design considerations

  • Ensure text has good legibility and readability
  • Sufficient text size, contrast, line height, line length…
  • Ensure information is not communicated by shape, colour, or location alone
  • Provide appropriate text alternative for images

GDS: Accessibility for content designers

Toggle screenshot Checkboxes screenshot

Native browser form elements are really good

Mouse, keyboard, touch, ...?

Don't set outline: none without providing a focus state

Place HTML elements in natural reading order

i.e. Title -> Nav -> Content

Hidden content

Visible visually Hidden visually
Visible to screen readers πŸ˜€ CSS opacity, position etc
Hidden from screen readers aria-hidden display:none + HTML5 hidden

TabIndex

Positive Controls the specific tabbing order (not recommended)
Zero Makes an element tabbable and inserts it into the regular tab order
Negative Makes an element programmatically focusable, but not tabbable

Avoid select boxes and radio buttons

afb.org/info/accessibility/creating-accessible-websites/accessible-forms/235 Burn your select tags - Alice Bartlett

WAI-ARIA

developer.mozilla.org/en-US/docs/Learn/Accessibility/WAI-ARIA_basics

Roles, Properties, & States

Roles

e.g. presentation, navigation, tabgroup, tab, etc.

webteacher.ws/2010/10/14/aria-roles-101/

Properties

e.g. aria-label, aria-live, aria-describedby, aria-required, etc.

aria-live

off Default. Updates should not be announced.
polite Updates should only be announced if the user is idle.
assertive Updates should be announced to the user as soon as possible.
rude Updates should be announced immediately, interrupting the user if necessary.

States

e.g. aria-hidden, aria-selected, aria-checked, aria-disabled, etc.

Don't slap ARIA tags on everything

simplyaccessible.com/article/danger-aria-tabs/
Screen reader illustration

Screenreaders

VoiceOver logo

VoiceOver

help.apple.com/voiceover/info/guide/

Hello everybody! I am invisible text. I have been hidden using opacity: 0

Links

Chur

Slides: richardwestenra.com/a11y-talk