Keyboard Access

40% of people with a motor impairment have difficulty using their hands. Many cannot use a mouse.

Problems

  • Screen reader users generally do not use a mouse.
  • 40% of people with a motor impairment have difficulty using their hands. Many cannot use a mouse.

WCAG Success Criteria

User Story

As a user who cannot use a mouse, I need to move in and out of components with a keyboard, so I don't get trapped.

WCAG Sufficient Techniques

Testing Method

  • Try tabbing through the page using the keyboard
  • Can you select and navigate menus using the arrow keys?
  • Do mouse hover states for links and buttons work?
  • Can you successfully tab to the end of the page?
  • Do the comboboxes still work after they have been opened and closed the first time?
  • Tip: Use SHIFT and TAB to tab back up the page

Expected Behaviour

  • The W3C's ARIA Authoring Practices Guide (APG) provides a list of expected keyboard behaviours for common form components including, accordions, alerts, buttons, checkboxes, comboboxes, disclosure (show/hide) and menus.

Practical Exercise 1

Keyboard Friendly CSS

  • Wherever you have a style for :hover, make sure that you also have a style for :focus

  • Incorrect

    /* link styles */
    a:link { color: #03c; }
    a:visited { color: #606; }
    a:hover { color: #c00; }
    a:active { color: #600; }
    li { margin-bottom: 0.4em; }
    
  • Correct

    /* link styles */
    a:link { color: #03c; }
    a:visited { color: #606; }
    a:hover { color: #c00; }
    a:focus { color: #600; }
    a:active { color: #600; }
    li { margin-bottom: 0.4em; }
    

Practice Exercise 2

Need web help?

All websites and applications which form part of the University web presence are expected to be compliant with the W3C's Web Accessibility Guidelines (WCAG) 2.2 AA guidelines.

Get web accessibility help