Accessibility topic

One of the guiding principles of the Testing Library APIs is that they should enable you to test your app the way your users use it, including through accessibility interfaces like screen readers.

See the page on queries for details on how using a semantic HTML query can make sure your app works with browser accessibility APIs.

Learn more:


getRoles(Node container, {bool hidden = false}) Map<String, List> Accessibility
Returns a map, indexed by role name, with each value being an array of elements in container which have that implicit ARIA role.
isInaccessible(Element element) bool Accessibility
Returns whether or not element should be excluded from the accessibility API by the browser.
logRoles(Node container, {bool hidden = false}) → void Accessibility
Prints a list of all the implicit ARIA roles within container, each role containing a list of all of the nodes which match that role.