Frontend System Design1 min readPremium

Empowering Web Accessibility with ARIA: Roles and Attributes Explained

ARIA roles are used to provide additional information to assistive technologies (such as screen readers) about the purpose and behavior of elements on a web page. This helps users with disabilities, particularly those who may not be able to interact with a page using a traditional mouse or visual interface. MDN keeps a full list of WAI-ARIA roles.

role=”button”

  • Purpose: Indicates that an element functions as a button.
  • Accessibility Benefit: Screen readers will announce the element as a button, allowing users to understand that it’s interactive and can be activated.
  • Purpose: Indicates that an element functions as a hyperlink.
  • Accessibility Benefit: Screen readers will announce the element as a link, letting users know that it leads to another page or resource.

role=”heading”:

  • Purpose: Specifies the heading level of an element.
  • Accessibility Benefit: Screen readers use headings to create a hierarchical structure for the content, aiding users in understanding the organization and flow of the page.

role=”navigation”:

  • Purpose: Denotes a navigation region within a page.
  • Accessibility Benefit: Screen readers can identify navigation sections, helping users quickly locate menus or links to different parts of the website.

role=”checkbox”:

  • Purpose: Represents a checkbox input.
  • Accessibility Benefit: Screen readers will recognize... premium content.
Premium

Keep reading with Premium

Get the rest of this guide plus every premium question, solution, and system design deep dive.

  • All premium solutions
  • System design deep dives
  • Company-specific prep

4.9/5 from our users