Lesson 10The design process: how to make room for web accessibility?
- Notion 67 - Consider the layout
- Notion 68 - How you can use design to optimise your content
- Notion 69 - Make initial mock-ups
- Notion 70 - Usability is key!
- Notion 71 - Structure HTML properly
- Notion 72 - Your use of language matters
- Notion 73 - How to work with visual content
- Notion 74 - The importance of keyboard-only navigation
- Notion 75 - Pro-tips on design that are universally useful
- Notion 76 - Types of content to avoid at all costs
- Notion 77 - Check for conformance to accessibility standards and best practices
- Notion 78 - Review of the main concepts
Notion 74
The importance of keyboard-only navigation
Target skills
Keyboard navigation offers an overall better user experience on a website. Being able to carry out all the different actions on a web page by using only your keyboard makes a significant impact on user efficiency. It also makes your website keyboard accessible in the eyes of the Web Content Accessibility Guidelines. On the other hand, using a mouse can be difficult for users with motor disabilities, visual impairments or for those with hardware limitations. In addition, complex mouse interactions can limit the accessibility of your web page.
Here are some actions in which the keyboard can replace a mouse.
To begin, you can see in this Canva the keyboard keys mainly used for navigation on an accessible website:
Clicking with a keyboard
The Enter key is considered the equivalent of clicking on a button or submitting a form. Once a web page element is focused, Enter will trigger its actions. Drag-and-drop actions can be tricky without a mouse and should have a keyboard alternative like, for example, one based on numerical values or action buttons.
Focusing on elements
The mouse is a great tool to point at something on the screen. To provide users with the same experience, keyboard accessibility should also ensure that any element of interest is focusable, like buttons, links, or menus. Some HTML anchors, such as anchors on the navigation menu and in the main sections or titles, can also help browse pages more easily with the keyboard.
Scrolling with a keyboard
Scrolling a page with a keyboard is a native function in HTML, too, and you should therefore not limit users' scrolling to only a mouse. Beware of trapping the visitor in a frame without the possibility to exit! A situation like this may occur with modals, forms or menus.
On a keyboard, the Tab key is also a good way to browse the whole web page and all its elements quickly.
Providing visitors with feedback
When browsing and focusing on an element, the visitor should know the mouse cursor's location. It helps to know when to click on something or where on the page the cursor is looking. Do not override the outline on focus option; otherwise, some users might lose the cursor!
HTML is keyboard-accessible by default
Fortunately, HTML is fully compatible with keyboard navigation. There are a few things that developers should pay attention to and should avoid:
- Custom features not handled by HTML by default
- Event listener based on some mouse events
- Overriding keyboard navigation.
To go further:
- Outline on focus: https://coryrylan.com/blog/dont-override-css-outline-focus-styles
- Keyboard-navigable JavaScript widgets: https://developer.mozilla.org/en-US/docs/Web/Accessibility/Keyboard-navigable_JavaScript_widgets