ARIA
Accessible Rich Internet Applications (ARIA) is a set of attributes that define ways to make web content and web applications (especially those developed with JavaScript) more accessible to people with disabilities.
ARIA enables developers to describe their widgets in more detail by adding special attributes to the markup. Designed to fill the gap between standard HTML tags and the desktop-style controls found in dynamic web applications, ARIA provides roles and states that describe the behavior of most familiar UI widgets.
Here's the markup for a progress bar widget:
This progress bar is built using a <div>
, which has no meaning. Unfortunately, there isn't a more semantic tag available to developers in HTML 4, so we need to include ARIA roles and properties. These are specified by adding attributes to the element. In this example, the role="progressbar"
attribute informs the browser that this element is actually a JavaScript-powered progress bar widget. The aria-valuemin
and aria-valuemax
attributes specify the minimum and maximum values for the progress bar, and the aria-valuenow
describes the current state of it and therefore must be kept updated with JavaScript.
Along with placing them directly in the markup, ARIA attributes can be added to the element and updated dynamically using JavaScript code like this:
Last updated
Was this helpful?