386+ Tools Comprehensive Tools for Webmasters, Developers & Site Optimization

ARIA Role Reference - Complete Guide to ARIA Attributes

ARIA Role Reference

Comprehensive searchable database of ARIA roles with descriptions, usage guidelines, and code examples.

54 ARIA Roles
role="alert"

Description: A message with important, time-sensitive information

Usage: Use for dynamic content that needs immediate attention

Example:

<div role="alert">Your session will expire in 5 minutes</div>
role="application"

Description: A region with application-like behavior

Usage: Use sparingly for web applications that handle keyboard events

Example:

<div role="application" aria-label="Spreadsheet editor">...</div>
role="article"

Description: A section of content that forms an independent part

Usage: Use for blog posts, articles, forum posts

Example:

<article role="article"><h2>Article Title</h2><p>Content...</p></article>
role="banner"

Description: Site-wide content, typically a header

Usage: Use for page header/logo area

Example:

<header role="banner"><h1>Site Name</h1></header>
role="button"

Description: An input that allows user-triggered actions

Usage: Use when creating custom buttons from div/span elements

Example:

<div role="button" tabindex="0" onclick="doAction()">Click me</div>
role="checkbox"

Description: A checkable input with three states: true, false, or mixed

Usage: Use for custom checkbox implementations

Example:

<div role="checkbox" aria-checked="false" tabindex="0">Subscribe</div>
role="combobox"

Description: A composite widget with a textbox and popup

Usage: Use for autocomplete and searchable dropdowns

Example:

<input role="combobox" aria-expanded="false" aria-controls="listbox1">
role="complementary"

Description: Supporting content related to main content

Usage: Use for sidebars and related content

Example:

<aside role="complementary"><h2>Related Articles</h2></aside>
role="contentinfo"

Description: Information about the page, typically a footer

Usage: Use for page footer with copyright/contact info

Example:

<footer role="contentinfo"><p>&copy; 2024 Company</p></footer>
role="definition"

Description: The definition of a term

Usage: Use with term role for definitions

Example:

<div role="definition">A markup language for creating web pages</div>
role="dialog"

Description: A dialog or window that prompts the user for information

Usage: Use for modal dialogs and overlays

Example:

<div role="dialog" aria-labelledby="dialogTitle" aria-modal="true"><h2 id="dialogTitle">Confirm Action</h2></div>
role="document"

Description: A region containing document content

Usage: Use for embedded documents

Example:

<div role="document" aria-label="Terms of Service">...</div>
role="feed"

Description: A scrollable list of articles

Usage: Use for social media feeds or news streams

Example:

<div role="feed" aria-label="News feed"><article role="article">...</article></div>
role="figure"

Description: A container for graphic content with caption

Usage: Use for images with captions

Example:

<div role="figure" aria-labelledby="caption1"><img src="..."><p id="caption1">Caption</p></div>
role="form"

Description: A landmark region containing form elements

Usage: Use for search forms or important forms

Example:

<div role="form" aria-label="Contact form"><form>...</form></div>
role="grid"

Description: An interactive data table or grid

Usage: Use for editable data grids

Example:

<div role="grid" aria-labelledby="gridTitle"><div role="row">...</div></div>
role="gridcell"

Description: A cell in a grid or treegrid

Usage: Use for individual cells in data grids

Example:

<div role="gridcell" tabindex="0">Cell content</div>
role="group"

Description: A set of user interface objects

Usage: Use to group related elements

Example:

<div role="group" aria-labelledby="groupLabel"><h3 id="groupLabel">Settings</h3></div>
role="img"

Description: A container for image elements

Usage: Use for complex images made of multiple elements

Example:

<div role="img" aria-label="Company logo"><svg>...</svg></div>
role="list"

Description: A section containing list items

Usage: Use when semantic list markup isn't possible

Example:

<div role="list"><div role="listitem">Item</div></div>
role="listbox"

Description: A list from which users can select items

Usage: Use for custom select dropdowns

Example:

<ul role="listbox" aria-label="Options"><li role="option">Item 1</li></ul>
role="listitem"

Description: A single item in a list

Usage: Use for items in non-semantic lists

Example:

<div role="listitem">List item content</div>
role="log"

Description: A region for sequentially updated information

Usage: Use for chat logs or status logs

Example:

<div role="log" aria-live="polite" aria-atomic="false">...</div>
role="main"

Description: The main content of the document

Usage: Use once per page for primary content

Example:

<main role="main"><h1>Page Title</h1><p>Content...</p></main>
role="marquee"

Description: Content that scrolls automatically

Usage: Use for auto-scrolling announcements

Example:

<div role="marquee" aria-live="off">Scrolling content...</div>
role="math"

Description: Mathematical expression

Usage: Use for mathematical content

Example:

<div role="math" aria-label="x squared plus y squared">x² + y²</div>
role="menu"

Description: A list of choices or actions

Usage: Use for dropdown menus

Example:

<ul role="menu"><li role="menuitem">Option 1</li></ul>
role="menubar"

Description: A presentation of menu choices in a horizontal bar

Usage: Use for horizontal menu bars

Example:

<ul role="menubar"><li role="menuitem">File</li></ul>
role="menuitem"

Description: An option in a menu

Usage: Use for individual menu options

Example:

<li role="menuitem" tabindex="0">Save</li>
role="navigation"

Description: A collection of navigational elements

Usage: Use for major navigation blocks

Example:

<nav role="navigation" aria-label="Main navigation"><ul>...</ul></nav>
role="none"

Description: Synonym for presentation role

Usage: Use to remove semantic meaning

Example:

<div role="none">Decorative element</div>
role="note"

Description: A section with parenthetic or ancillary content

Usage: Use for footnotes or side notes

Example:

<aside role="note" aria-label="Note">Note: This is important</aside>
role="option"

Description: A selectable item in a listbox

Usage: Use for items in listbox widgets

Example:

<li role="option" aria-selected="false">Option 1</li>
role="presentation"

Description: An element whose semantics should be ignored

Usage: Use to remove semantic meaning from layout elements

Example:

<table role="presentation"><tr><td>Layout only</td></tr></table>
role="progressbar"

Description: An element displaying progress of a task

Usage: Use for progress indicators

Example:

<div role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">50%</div>
role="radio"

Description: A checkable input in a group of radio roles

Usage: Use for custom radio button implementations

Example:

<div role="radio" aria-checked="false" tabindex="0">Option 1</div>
role="radiogroup"

Description: A group of radio buttons

Usage: Use to group related radio buttons

Example:

<div role="radiogroup" aria-labelledby="groupLabel"><div role="radio">...</div></div>
role="region"

Description: A landmark region with specific purpose

Usage: Use for important page sections with aria-label

Example:

<div role="region" aria-labelledby="regionTitle"><h2 id="regionTitle">Features</h2></div>
role="row"

Description: A row of cells in a grid

Usage: Use for rows in grids and tables

Example:

<div role="row"><div role="gridcell">Data</div></div>
role="search"

Description: A landmark region for search functionality

Usage: Use for search input areas

Example:

<div role="search"><label>Search: <input type="search"></label></div>
role="slider"

Description: An input for selecting a value from a range

Usage: Use for custom slider controls

Example:

<div role="slider" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" tabindex="0"></div>
role="spinbutton"

Description: An input for selecting from discrete choices

Usage: Use for number spinners

Example:

<div role="spinbutton" aria-valuenow="5" aria-valuemin="1" aria-valuemax="10" tabindex="0">5</div>
role="status"

Description: A container for status updates

Usage: Use for status messages and notifications

Example:

<div role="status" aria-live="polite">Loading...</div>
role="switch"

Description: A checkbox representing on/off values

Usage: Use for toggle switches

Example:

<button role="switch" aria-checked="true">Dark Mode</button>
role="tab"

Description: A clickable element inside a tablist

Usage: Use for individual tabs in a tab interface

Example:

<button role="tab" aria-selected="true" aria-controls="panel1">Tab 1</button>
role="tablist"

Description: A container for a set of tab elements

Usage: Use for tab interface containers

Example:

<div role="tablist" aria-label="Content tabs"><button role="tab">Tab 1</button></div>
role="tabpanel"

Description: Content associated with a tab

Usage: Use for content panels in tab interfaces

Example:

<div role="tabpanel" id="panel1" aria-labelledby="tab1">Content...</div>
role="term"

Description: A word or phrase being defined

Usage: Use for glossary terms

Example:

<span role="term" aria-label="Hypertext Markup Language">HTML</span>
role="textbox"

Description: An input for free-form text

Usage: Use for custom text input implementations

Example:

<div role="textbox" contenteditable="true" aria-label="Comment"></div>
role="timer"

Description: A numerical counter showing elapsed time

Usage: Use for countdown timers

Example:

<div role="timer" aria-live="off">5:00</div>
role="toolbar"

Description: A collection of commonly used controls

Usage: Use for toolbars with action buttons

Example:

<div role="toolbar" aria-label="Text formatting"><button>Bold</button></div>
role="tooltip"

Description: Contextual popup displaying information

Usage: Use for custom tooltips

Example:

<div role="tooltip" id="tip1">Helpful information</div>
role="tree"

Description: A hierarchical list structure

Usage: Use for file trees or nested navigation

Example:

<ul role="tree"><li role="treeitem">Root</li></ul>
role="treeitem"

Description: An item in a tree widget

Usage: Use for items in tree structures

Example:

<li role="treeitem" aria-expanded="false">Folder</li>

What are ARIA Roles?

ARIA (Accessible Rich Internet Applications) roles are attributes that define the purpose and behavior of elements to assistive technologies like screen readers. They help make dynamic web applications accessible to users with disabilities.

How to Use This Reference:

  1. Search: Enter keywords to find specific ARIA roles (e.g., "button", "navigation", "menu")
  2. Browse: Scroll through all available roles to discover options
  3. Learn: Read the description and usage guidelines for each role
  4. Copy Example: Use the code examples as templates for your projects
  5. Test: Implement the role and test with screen readers

ARIA Role Categories:

Landmark Roles

Define page structure: banner, navigation, main, contentinfo, complementary, search, form, region

Widget Roles

Interactive elements: button, checkbox, radio, textbox, slider, switch, spinbutton

Composite Roles

Complex widgets: tablist, tab, tabpanel, menu, menubar, menuitem, listbox, combobox, grid

Document Structure Roles

Content organization: article, list, listitem, row, group, figure, img

Live Region Roles

Dynamic content: alert, status, log, timer, marquee

Best Practices:

  • Use Native HTML First: Prefer <button> over <div role="button"> when possible
  • Add Keyboard Support: Elements with interactive roles need keyboard event handlers
  • Include aria-label: Many roles need labels for context (e.g., aria-label="Main navigation")
  • Test with Screen Readers: Always test ARIA implementations with actual assistive technologies
  • Don't Override Semantics: Avoid putting ARIA roles on elements that already have appropriate semantics
  • Validate Your Code: Use accessibility validators to check ARIA usage

Common ARIA Attributes:

aria-label: Provides a text label for an element
<button aria-label="Close dialog">×</button>
aria-labelledby: References another element's ID for the label
<div role="dialog" aria-labelledby="dialogTitle">
aria-describedby: References element(s) that describe the current element
<input aria-describedby="passwordHelp">
aria-hidden: Hides content from assistive technologies
<div aria-hidden="true">Decorative content</div>
aria-expanded: Indicates if a control is expanded
<button aria-expanded="false" aria-controls="menu">Menu</button>
aria-checked: Indicates the state of checkable elements
<div role="checkbox" aria-checked="true">
aria-selected: Indicates if an option is selected
<li role="option" aria-selected="true">Option 1</li>
aria-live: Announces dynamic content changes
<div aria-live="polite">Status updates...</div>

Examples of Common Patterns:

Modal Dialog
<div role="dialog" aria-labelledby="dialogTitle" aria-modal="true">
  <h2 id="dialogTitle">Confirm Action</h2>
  <p>Are you sure?</p>
  <button>Confirm</button>
  <button>Cancel</button>
</div>
Tab Interface
<div role="tablist" aria-label="Content tabs">
  <button role="tab" aria-selected="true" aria-controls="panel1">Tab 1</button>
  <button role="tab" aria-selected="false" aria-controls="panel2">Tab 2</button>
</div>
<div role="tabpanel" id="panel1">Content 1</div>
<div role="tabpanel" id="panel2" hidden>Content 2</div>
Custom Dropdown Menu
<button aria-haspopup="true" aria-expanded="false" aria-controls="menu1">
  Menu
</button>
<ul role="menu" id="menu1" hidden>
  <li role="menuitem">Option 1</li>
  <li role="menuitem">Option 2</li>
  <li role="menuitem">Option 3</li>
</ul>

Testing Your ARIA Implementation:

  • Screen Readers: Test with NVDA (Windows), JAWS (Windows), or VoiceOver (Mac/iOS)
  • Browser DevTools: Use accessibility inspectors in Chrome, Firefox, or Edge
  • Automated Tools: Run axe, WAVE, or Lighthouse accessibility audits
  • Keyboard Navigation: Ensure all interactive elements are keyboard accessible

Related Tools:

Additional Resources: