ARIA and HTML

Most developers are familiar with the standard markup language of the modern web, HyperText Markup Language (HTML). However, you may be less familiar with Accessible Rich Internet Applications (ARIA) (formally called WAI-ARIA): what it is, how it is used, and when—and when not—to use it.

HTML and ARIA play important roles in making digital products accessible, especially when it comes to assistive technology (AT) such as screen readers. Both are used to convert content into an alternate format, such as Braille or Text-to-Speech (TTS).

Review a short history of ARIA, why it is important, and when and how best to use it.

Introduction to ARIA

ARIA was first developed in 2008 by the Web Accessibility Initiative (WAI) group—a subset of the overarching World Wide Web Consortium (W3C), which governs and regulates the internet.

ARIA is not a true programming language but a set of attributes you can add to HTML elements to increase their accessibility. These attributes communicate role, state, and property to assistive technologies using accessibility APIs found in modern browsers. This communication happens through the accessibility tree.

"WAI-ARIA, the Accessible Rich Internet Applications Suite, defines a way to make web content and web applications more accessible to people with disabilities. It especially helps with dynamic content and advanced user interface controls developed with HTML, JavaScript, and related technologies."

The WAI group

The accessibility tree

ARIA modifies incorrect or incomplete code to create a better experience for those using AT by changing, exposing, and augmenting parts of the accessibility tree.

The accessibility tree is created by the browser and based on the standard Document Object Model (DOM) tree. Like the DOM tree, the accessibility tree contains objects representing all the markup elements, attributes, and text nodes. The accessibility tree is also used by platform-specific accessibility APIs to provide a representation that assistive technologies can understand.

The ARIA augmented accessibility tree.

ARIA on its own doesn't change an element's functionality or visual appearance. That means only AT users will notice differences between a digital product with ARIA and one without it. That also means that developers alone are responsible for making the appropriate code and styling changes to make an element as accessible as possible.

The three main features of ARIA are roles, properties, and states/values.

Roles define what an element is or does on the page or app.

Self-destruct

Properties express characteristics or relationships to an object.

Self-destruct
This page will self-destruct in 10 seconds.

States and values define the current conditions or data values associated with the element.

Self-destruct
This page will self-destruct in 10 seconds.

While all three elements of ARIA can be used in one line of code, it's not required. Instead, layer ARIA roles, properties, and states or values until you've accomplished your final accessibility goal. Correctly incorporating ARIA into your codebase ensures that AT users will have all the information they need to use your website, app, or other digital product successfully and equitably.

Recently, Chrome DevTools has created a way to see the full accessibility tree making it easier for developers to understand how their code impacts accessibility.

When to use ARIA

In 2014, the W3C officially published the HTML5 recommendation. With it came some big changes, including the addition of landmark elements such as

,
,
,