ARIA Roles 101

See Also: ARIA States 101

As part of the Web Accessibility Initiative (WAI), the Accessible Rich Internet Applications Suite (ARIA), defines a way to make Web content and Web applications more accessible. It is used to improve the accessibility of dynamic content and advanced user interface controls developed with Ajax, HTML, JavaScript, and related technologies.

ARIA roles work now in many browsers and screen readers. When they don’t, they are harmless.

ARIA specifies the following:

  • Roles to describe the type of widget presented, such as “menu,” “treeitem,” “slider,” and “progressmeter”
  • Roles to describe the structure of the Web page, such as headings, regions, and tables (grids)
  • Properties to describe the state widgets are in, such as “checked” for a check box, or “haspopup” for a menu.
  • Properties to define live regions of a page that are likely to get updates (such as stock quotes), as well as an interruption policy for those updates—for example, critical updates may be presented in an alert dialog box, and incidental updates occur within the page
  • Properties for drag-and-drop that describe drag sources and drop targets
  • A way to provide keyboard navigation for the Web objects and events, such as those mentioned above

This article will look at the first two items dealing with ARIA roles.

How to use roles

As the list mentioned, roles describe widgets and structure. Structural roles are added to markup as attributes of elements. In XHTML, for example:

<div id="header" role="banner">
<div id="nav"  role="navigation">

or in HTML5

<header role="banner">
<nav role="navigation">

Roles used in ways like the preceding examples are navigation aids for machine readers and for assistive devices such as screen readers.

Roles that describe widgets are added to markup with additional information. The role in the example below identifies the element as a slider, with additional values using the aria prefix prepended to the property name. For example, in a slider widget that allows the user to select the day of the week, the values 1 – 7 indicate the days of the week. The first day of the week, number 1, is Sunday. The aria-valuemin and aria-valuemax restrict the options in the slider to 1 – 7.

<div role="slider"
aria-valuenow="1"
aria-valuemin="1" aria-valuemax="7"
aria-valuetext="Sunday"></div>

List of roles

The W3C list of roles is quoted below. Links go to further definitions of each role on the W3C site.

Roles that act as standalone user interface widgets or as part of larger, composite widgets.

Roles that act as composite user interface widgets. These roles typically act as containers that manage other, contained widgets.

Roles that describe document structures that organize content in a page.

Roles that act as navigational landmarks

Additional Resources

22 thoughts on “ARIA Roles 101

  1. What a coincidence, I was just going to cover ARIA with my students today.

    I think for simplicity sake I’ll only cover landmark roles in class as a nice introduction. I think at this stage in their learning, introducing all the states and stuff may be too much.

    • Thanks for your comment! Don’t know what your class is, Thomas, but for basic HTML needs I think you are right. When you go beyond landmark roles you’re getting into widget and web app development.

  2. Pingback: Link Roundup – October 2010 | taniadr01

  3. Pingback: Link Roundup – October 2010 | magdal01

  4. Pingback: Useful 10 minutes of WAI ARIA | cssgallery.info

  5. Pingback: Basic Facts and Resources You Need to Know Now About Web Accessibility « Lorelle on WordPress

  6. Pingback: Confluence: Technology Wiki

  7. Pingback: JavaScript Reference Links | kabayview.com

  8. Pingback: Books Empire» Blog ArchiveAccessibility: What’s Your Markup Saying to You? » Books Empire

  9. Pingback: Accessibility: What’s Your Markup Saying to You? | Shadowtek | Hosting and Design Solutions

  10. Pingback: 10 minutos útiles de WAI ARIA | My Blog

  11. What is needed (and I haven’t had luck finding) is the URL of a working example for each role/widget type.
    Having read the abstract design pattern associated with several of these roles, a picture would help, and even better a working example!

    • I’ve thought the same thing, especially about the widgets, which seem a bit obscure to me. If I find such a demo, I’ll definitely mention it here.

  12. Pingback: CSSquirrel : Disembodied | opinions and news on web design by Kyle Weems

  13. Pingback: How To Sell The Value Of Mobile To Clients | Web Design Kansas City | Inspire Web Designs

  14. Pingback: Mobile Is Not An Add-On — How To Sell The Value Of Mobile To Clients | Smashing Magazine

  15. Pingback: Mobile Is Not An Add-On — How To Sell The Value Of Mobile To Clients

  16. Pingback: Think about ARIA roles when choosing a WordPress theme - Updated | Web TeacherWeb Teacher

  17. Pingback: How To Sell The Value Of Mobile To Clients

Leave a Reply