Main Objective:
To ensure all user interface components have their accessible attributes—name, role, value, state, and properties—correctly defined and programmatically available to assistive technologies, facilitating interaction for users with disabilities, it is crucial to use semantic HTML. By default, semantic HTML provides components with predefined name, role, value, and state attributes.
However, when web authors create complex web content, such as interactive widgets or applets (e.g., tab panels, trees, nested navigation bars), essential attributes like name, role, value, state, or keyboard functionality might be overlooked. Integrating WAI-ARIA ensures that these interactive components possess all necessary attributes.
Testing these components with a screen reader confirms the presence of correct WAI-ARIA attributes. For example, a fancy slider created without semantic HTML may lack essential attributes. To rectify this, attributes like aria-label or aria-labelledby for the accessible name, role="slider" for role, aria-valuemax , aria-valuemin , and aria-valuenow for properties and states, tabindex="0" for enabling keyboard focus, and JavaScript for functionality should be included.
Prioritizing semantic HTML not only saves time but also reduces testing efforts and potential accessibility failures.