Accessibility Tip: Support keyboard only access

Last updated on January 01, 2022A11y issues

If you can make your site usable with just a keyboard then it is likely that other assistive input devices can also use your site so you should always aim to make sure it is usable by just a keyboard.

It is also very easy to test (we don’t need any specalised hardware to test it).

How to test

Try using your site or application with just a keyboard. You should be able to tab around and interact with everything.

For some interactive features such as tabs there are specific interactions (such as left/right arrow functionality to switch between tabs) that you can find in the WCAG specs (example on MDN: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tab_role#keyboard_interaction )

WCAG guidelines

Success Criterion 2.1.1 Keyboard (Level A):

https://www.w3.org/WAI/WCAG21/Understanding/keyboard.html

Success Criterion 2.1.1 Keyboard (Level A): All functionality of the content is operable through a keyboard interface without requiring specific timings for individual keystrokes, except where the underlying function requires input that depends on the path of the user’s movement and not just the endpoints.

This exception relates to the underlying function, not the input technique. For example, if using handwriting to enter text, the input technique (handwriting) requires path-dependent input but the underlying function (text input) does not.

This does not forbid and should not discourage providing mouse input or other input methods in addition to keyboard operation.

Found this post useful?

Please consider sharing this link with your work colleagues or on social media. There are no ads on my site, I just want to promote accessibility.

Found an issue? please point them out - let me know if there is a mistake and I'll update it

Follow me on Twitter: @A11yForDevs. I post links to interesting a11y articles and resources.

More posts

Welcome to Accessibility for Developers

New to accessibility?

Accessibility for Developers

This is a free site to give advice on how to make your website accessible

I have been a software developer for nearly a couple of decades, and really want to help promote better accessibility in apps and websites that we, as developers, create! Accessibility isn't very difficult, it is just important to be aware about it and understand it.

If you spot any mistakes or have any suggestions, ideas or collaborations please check out my contact page.

Important: The information on this website is for general informational purposes only. I make no representation or warranty, express or implied. Your use of the site is solely at your own risk. I've tried my best to make sure all information is accurate, but I am just a software engineer (not an accessibility expert).