Enable javascript in your browser for better experience. Need to know to enable it? Go here.
radar blip
radar blip

Accessibility-aware component test design

Published : Apr 26, 2023
Apr 2023
Assess ? Worth exploring with the goal of understanding how it will affect your enterprise.

One of the many places in the software delivery process to consider accessibility requirements early on is during web component testing. Testing framework plugins like chai-a11y-axe provide assertions in their API to check for the basics. But in addition to using what testing frameworks have to offer, accessibility-aware component test design further helps to provide all the semantic elements needed by screen readers and other assistive technologies.

Firstly, instead of using test ids or classes to find and select the elements you want to validate, use a principle of identifying elements by ARIA roles or other semantic attributes that are used by assistive technologies. Some testing libraries, like Testing Library, even recommend this in their documentation. Secondly, do not just test for click interactions; also consider users who cannot use a mouse or see the screen, and consider adding additional tests for the keyboard and other interactions.

Download Technology Radar Volume 28

English | Español | Português | 中文

Stay informed about technology


Subscribe now

Visit our archive to read previous volumes