WAI-ARIA (Web Accessibility Initiative – Accessible Rich Internet Applications), often referred to as ARIA, is a defined technical specification for attributes in the HTML language. The goal of ARIA is to make web content and web applications more accessible to people with disabilities.
Many people turn to assistive technologies, like screen readers, to make it possible or easier to use the web. While they’ve greatly helped people who may have been more excluded from digital content in the past, assistive technologies aren’t always able to work with dynamic web content or advanced user interaction elements (such as drag-and-drop functionality).
In order to understand how to best present websites to a user, assistive technologies need to understand the semantics of web elements and content. ARIA is intended to provide these semantics, enhancing and improving the accessibility of user interfaces and dynamic content.
The semantics of ARIA are separated into two major categories: first, ARIA roles; and second, ARIA states and properties that are supported by these roles.
Roles in ARIA are HTML attributes that define how a particular HTML element functions semantically within the document. For example, the code below describes a save button that is defined using the ARIA role “button”:
<div id="saveChanges" tabindex="0" role="button">Save</div>
The majority of ARIA roles fall into two categories: widget roles and document structure roles. Widget roles (such as “button”) describe how the element should be presented to the user. Some examples of ARIA widget roles are:
Document structure roles, on the other hand, describe how a particular element is organized within the page. Some examples of ARIA document structure roles are:
States and properties in ARIA are HTML attributes used to enhance ARIA roles with additional information about a role's current or anticipated state. There are three main functions for ARIA states and properties:
For example, the code below describes a form that requires users to enter their first name and last name using the “aria-required” attribute:
<form action="post">
<label for="firstName">First name:</label>
<input id="firstName" type="text" aria-required="true" />
<br>
<label for="lastName">Last name:</label>
<input id="lastName" type="text" aria-required="true" />
<br>
<label for="streetAddress">Street address:</label>
<input id="streetAddress" type="text" />
</form>
Some examples of ARIA states and properties are:
ARIA is a deep technical specification, and requires an in-depth knowledge of the proper roles, states, and properties in order to be maximally useful. To learn more about ARIA and other web accessibility standards, follow the Bureau of Internet Accessibility blog or contact our accessibility experts for a free 30-minute consultation.