Accessibility
Accessibility is the
practice of making your websites usable by as many people as
possible.
This means ensuring not to lock anyone out of accessing information because of any disability they may have, or any other personal circumstances such as the device they are using, the speed of their network connection, or their geographic location.
- To expose information to people with visual disabilities the accessibility APIs available inside web browsers, renders information on what roles the different elements on your page play (e.g., are they just text, or are they buttons, links, form elements, etc.?).
- Semantic DOM elements have roles assigned to them by default that hint at what their purpose is.
- Sometimes, however, you need to use some non-semantic markup (e.g.,
- s) to build a complex custom control, and the control won't have a default role that reflects its purpose. In such a situation, you can use WAI-ARIA role attributes to provide your own roles.
- Roles and other information exposed by browser accessibility APIs are presented in a hierarchical structure called the accessibility tree.
- This is a bit like the DOM tree, except that it contains a more limited set of elements and slightly different information about them.
- Assistive technologies like screenreaders use this information to find out what's on a web page, tell their users what's there, and enable them to interact with the page.
- The Accessibility Inspector also uses this information to provide valuable accessibility debugging capabilities in the DevTools.