Skip to content
aria-expert logo

ARIA Expert

aria-expert

Expert knowledge of WAI-ARIA (Accessible Rich Internet Applications). Use when users ask about ARIA roles, states, properties, accessible name computation, ARIA attributes (aria-label, aria-labelledby, aria-describedby, etc.), widget roles, landmark roles, live regions, ARIA best practices, or ho...

SKILL.md

Full skill instructions

ARIA Expert

Expert resource for WAI-ARIA (Accessible Rich Internet Applications) specifications and implementation guidance.

Auto-Initialize

Before reading any ARIA files, check if the repo/​aria-spec/ and repo/​apg-repo/ folders exist in this skill directory. If they don't exist, run the setup script:

cd .cursor/​skills/​aria-expert && ./​setup.sh

This clones the official W3C ARIA repository and the ARIA Authoring Practices Guide. Only needs to run once.

Updating Content

To pull the latest ARIA specifications:

cd .cursor/​skills/​aria-expert/​repo/​aria-spec && git pull
cd .cursor/​skills/​aria-expert/​repo/​apg-repo && git pull

Data Source

This skill uses the official W3C ARIA repository and ARIA Authoring Practices Guide (APG) as git submodules. Content is in HTML format (ReSpec specifications).

ARIA Authoring Practices Guide (APG)

| Path | Content | |------|---------|| | repo/​apg-repo/ | ARIA Authoring Practices Guide | | repo/​apg-repo/​content/​patterns/ | Design patterns for common widgets |

Key content in APG:

  • 5 Rules of ARIA Use - Fundamental principles (see section below)
  • Design Patterns - Complete examples with code for:
    • Accordion, Alert, Breadcrumb, Button, Carousel, Checkbox, Combobox
    • Dialog (Modal), Disclosure, Feed, Grids, Links, Listbox, Menu, Meter
    • Radio Group, Slider, Spinbutton, Switch, Table, Tabs, Toolbar, Tooltip, Tree View
  • Keyboard Interaction Patterns - Required keyboard support for each pattern
  • Example Implementations - Working code examples
  • Landmark Regions - How to use ARIA landmarks effectively

Core ARIA Specification

PathContent
repo/​aria-spec/​index.htmlMain ARIA 1.3 specification - roles, states, properties

Key content in index.html:

  • All ARIA roles (button, link, tab, tabpanel, dialog, menu, etc.)
  • All ARIA states and properties (aria-label, aria-checked, aria-expanded, etc.)
  • Widget roles, composite roles, document structure roles
  • Landmark roles (banner, navigation, main, complementary, etc.)
  • Live region roles and properties
  • Relationship attributes (aria-labelledby, aria-describedby, aria-owns, etc.)

Accessible Name and Description Computation

PathContent
repo/​aria-spec/​accname/​index.htmlAccessible Name and Description Computation specification

Key content in accname:

  • How browsers compute accessible names
  • Name calculation algorithm
  • Description calculation algorithm
  • Text alternative computation
  • Hidden vs. visible content in name calculation

Accessibility API Mappings

PathContent
repo/​aria-spec/​core-aam/​index.htmlCore Accessibility API Mappings - how ARIA maps to platform APIs
repo/​aria-spec/​html-aam/​index.htmlHTML Accessibility API Mappings - HTML element mappings

Key content in AAM specs:

  • How ARIA roles map to platform accessibility APIs (MSAA, UIA, ATK, AX API)
  • How HTML elements map to accessibility APIs
  • Role, state, and property mappings
  • Required accessibility tree computations

Specialized ARIA Modules

PathContent
repo/​aria-spec/​dpub-aria/​index.htmlDigital Publishing ARIA - roles for digital publications
repo/​aria-spec/​dpub-aam/​index.htmlDigital Publishing AAM - mappings for dpub roles
repo/​aria-spec/​graphics-aria/​index.htmlGraphics ARIA - roles for graphics and diagrams
repo/​aria-spec/​graphics-aam/​index.htmlGraphics AAM - mappings for graphics roles

Format-Specific Mappings

PathContent
repo/​aria-spec/​svg-aam/​index.htmlSVG Accessibility API Mappings
repo/​aria-spec/​mathml-aam/​index.htmlMathML Accessibility API Mappings
repo/​aria-spec/​pdf-aam/​index.htmlPDF Accessibility API Mappings

Documentation

PathContent
repo/​aria-spec/​README.mdRepository overview and contribution guidelines
repo/​aria-spec/​CONTRIBUTING.mdHow to contribute to ARIA specifications

How to Answer ARIA Questions

For ARIA Best Practices, Rules, or Principles

Answer directly without searching files - The 5 Rules of ARIA Use are documented in this file above. No need to search the APG repo for these fundamental principles.

For Design Pattern Questions (e.g., "How to build a tabs widget?", "Dialog keyboard interaction")

  1. Read the appropriate pattern file in repo/​apg-repo/​content/​patterns/
  2. Common patterns:
    • accordion/ - Accordion pattern
    • alert/ - Alert pattern
    • button/ - Button pattern
    • dialog-modal/ - Modal dialog
    • tabs/ - Tabs pattern
    • menu-button/ - Menu button
    • combobox/ - Combobox/​autocomplete
  3. Each pattern includes:
    • Keyboard interaction requirements
    • ARIA roles, states, and properties
    • Working code examples

For Role Questions (e.g., "button role", "dialog role", "tablist")

  1. Read repo/​aria-spec/​index.html and search for the role name
  2. The spec contains:
    • Role definition and purpose
    • Required/​supported states and properties
    • Inherited states and properties
    • Required context (parent/​child roles)
    • Keyboard interaction expectations
    • Examples of proper usage

For State/​Property Questions (e.g., "aria-label", "aria-expanded", "aria-live")

  1. Read repo/​aria-spec/​index.html and search for the attribute name
  2. The spec contains:
    • Property definition
    • Valid values (true/​false, token list, string, etc.)
    • Which roles support the property
    • Usage examples
    • Relationship to other properties

For Accessible Name Questions

  1. Read repo/​aria-spec/​accname/​index.html
  2. Search for relevant sections:
    • Name calculation algorithm (step-by-step process)
    • Text alternative computation
    • Hidden content handling
    • Priority of name sources (aria-labelledby, aria-label, alt, etc.)

For API Mapping Questions

  1. For ARIA role/​property mappings: Read repo/​aria-spec/​core-aam/​index.html
  2. For HTML element mappings: Read repo/​aria-spec/​html-aam/​index.html
  3. Search for the specific role or element name
  4. The spec shows platform-specific mappings (Windows, macOS, Linux, etc.)

For Digital Publishing Questions

  1. Read repo/​aria-spec/​dpub-aria/​index.html
  2. Search for roles like: doc-abstract, doc-acknowledgments, doc-bibliography, doc-chapter, etc.

For Graphics Questions

  1. Read repo/​aria-spec/​graphics-aria/​index.html
  2. Search for roles like: graphics-document, graphics-symbol, graphics-object

5 Rules of ARIA Use

Critical principles for using ARIA correctly (from WAI-ARIA Authoring Practices):

Rule 1: Use Native HTML Semantics When Possible

If you can use a native HTML element or attribute with the semantics and behavior already built in, instead of re-purposing an element and adding ARIA, then do so.

Good: <button>Click me</​button>
Bad: <div role="button" tabindex="0">Click me</​div>

Rule 2: Don't Change Native Semantics

Do not change native semantics, unless you really have to.

Bad: <h1 role="button">Heading button</​h1>
Why: This creates confusion - it looks like a heading but acts like a button.

Rule 3: All Interactive ARIA Controls Must Be Keyboard Accessible

All interactive ARIA controls must be usable with the keyboard. If you create a widget using role="button", role="tab", etc., it must be keyboard accessible.

Required:

  • Tab/​Shift+Tab to navigate to controls
  • Enter/​Space to activate buttons and links
  • Arrow keys for composite widgets (tabs, menus, etc.)
  • Escape to close dialogs and menus

Rule 4: Don't Hide Focusable Elements

Do not use role="presentation" or aria-hidden="true" on a focusable element.

Bad: <button aria-hidden="true">Click me</​button>
Why: Screen readers will skip it, but keyboard users can still focus it, creating confusion.

Rule 5: All Interactive Elements Must Have an Accessible Name

All interactive elements must have an accessible name.

Methods to provide accessible names:

  • Visible text content: <button>Submit</​button>
  • aria-label: <button aria-label="Close dialog">×</​button>
  • aria-labelledby: <button aria-labelledby="label-id">×</​button>
  • alt text for images: <img src="logo.png" alt="Company name">

Bonus Principle: "No ARIA is Better Than Bad ARIA"

Incorrect ARIA can make accessibility worse for screen reader users than having no ARIA at all. When in doubt, test with real assistive technologies.


Quick Reference

Common Widget Roles

RolePurposeKey Properties
buttonClickable buttonaria-pressed, aria-expanded
linkHyperlinkaria-expanded
checkboxCheckable inputaria-checked (required)
radioRadio buttonaria-checked (required)
textboxText inputaria-multiline, aria-readonly, aria-required
comboboxCombo box widgetaria-expanded (required), aria-controls
listboxList of selectable itemsaria-multiselectable
optionSelectable optionaria-selected
tabTab in a tablistaria-selected (required)
tabpanelContainer for tab contentaria-labelledby (required)
menuMenu widget-
menuitemMenu item-
menuitemcheckboxCheckable menu itemaria-checked (required)
menuitemradioRadio menu itemaria-checked (required)
dialogDialog/​modal windowaria-modal, aria-labelledby
alertdialogAlert dialogaria-modal, aria-labelledby
sliderSlider controlaria-valuenow (required), aria-valuemin, aria-valuemax
progressbarProgress indicatoraria-valuenow, aria-valuemin, aria-valuemax

Landmark Roles

RolePurposeHTML5 Equivalent
bannerSite header<header> (when not in article/​section)
navigationNavigation links<nav>
mainMain content<main>
complementaryComplementary content<aside>
contentinfoFooter information<footer> (when not in article/​section)
searchSearch functionalityNo equivalent
regionSignificant page section<section> with accessible name
formForm landmark<form> with accessible name

Common ARIA Properties

PropertyTypePurpose
aria-labelStringProvides accessible name
aria-labelledbyID reference(s)Names element via other element(s)
aria-describedbyID reference(s)Provides accessible description
aria-expandedtrue/​false/​undefinedIndicates expanded state
aria-hiddentrue/​falseHides content from accessibility tree
aria-liveoff/​polite/​assertiveIndicates live region updates
aria-atomictrue/​falseAnnounces entire region on change
aria-relevantadditions/​removals/​text/​allWhat changes to announce
aria-controlsID reference(s)Element controlled by this element
aria-ownsID reference(s)Parent-child relationship
aria-currentpage/​step/​location/​date/​time/​true/​falseCurrent item in set
aria-disabledtrue/​falseIndicates disabled state
aria-invalidtrue/​false/​grammar/​spellingIndicates validation state
aria-requiredtrue/​falseIndicates required field

Document Structure Roles

RolePurpose
articleSelf-contained composition
documentDocument content
feedScrollable list of articles
headingSection heading
imgImage (for grouping elements into single image)
listList of items
listitemItem in a list
tableTable structure
rowTable row
cellTable cell
rowheaderRow header cell
columnheaderColumn header cell

Live Region Properties

PropertyValuesPurpose
aria-liveoff, polite, assertiveAnnounce updates
aria-atomictrue, falseAnnounce whole region
aria-relevantadditions, removals, text, allWhat to announce
aria-busytrue, falseRegion is updating

Digital Publishing Roles (dpub-aria)

RolePurpose
doc-abstractAbstract/​summary
doc-acknowledgmentsAcknowledgments
doc-afterwordAfterword
doc-appendixAppendix
doc-backlinkBack link
doc-biblioentryBibliography entry
doc-bibliographyBibliography
doc-bibliorefBibliography reference
doc-chapterChapter
doc-colophonColophon
doc-conclusionConclusion
doc-coverCover image
doc-creditCredit statement
doc-creditsCredits
doc-dedicationDedication
doc-endnoteEndnote
doc-endnotesEndnotes collection
doc-epigraphEpigraph
doc-epilogueEpilogue
doc-errataErrata
doc-exampleExample
doc-footnoteFootnote
doc-forewordForeword
doc-glossaryGlossary
doc-glossrefGlossary reference
doc-indexIndex
doc-introductionIntroduction
doc-noterefNote reference
doc-noticeNotice
doc-pagebreakPage break
doc-pagelistPage list
doc-partPart
doc-prefacePreface
doc-prologuePrologue
doc-pullquotePull quote
doc-qnaQ&A section
doc-subtitleSubtitle
doc-tipTip
doc-tocTable of contents

Graphics Roles (graphics-aria)

RolePurpose
graphics-documentGraphics document container
graphics-objectGraphics object
graphics-symbolGraphics symbol

Attribution

This skill uses material from the W3C ARIA Repository. Copyright © W3C® (MIT, ERCIM, Keio, Beihang). See W3C Document License.

More Design skills

brandkit logo
Design

brandkit

Premium brand-kit image generation for high-end identity systems, logo concepts, and visual-world presentations.

92.7K 345.8K
View

Premium website design-to-code skill that generates visual references first, then builds faithful frontend implementations.

92.7K 341.7K
View

Premium frontend image direction for landing pages and marketing sites, generating one distinct horizontal image per section.

92.7K 337.8K
View

Premium mobile app screen concepts and flows with clean hierarchy, strong imagery, and distinctive art direction.

92.7K 331.8K
View

Emil Kowalski's philosophy on UI polish, component design, and the invisible details that make software feel good.

43.5K 323.4K
View

Frontend design and iteration for production-grade interfaces, from concept to ship.

76.8K 313.3K
View

Reverse-engineer design tokens from public websites into starter token files for your project.

232 129.9K
View
Animate logo
Design

Animate

Builds an animation from scratch by making the decisions in the order that determines whether it feels right.

43.5K 117.9K
View

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

179.7K 114.2K
View

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

179.7K 100.1K
View

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

179.7K 89.5K
View

Design AI tools

Maze Guru logo
Images

Maze Guru

Chat-to-edit AI studio for product photos, portraits, branding, and video.

Freemium
View
R
Design

RoomGPT

Generate your dream room in seconds.

Paid
View

Redesign your interior in seconds using AI

Paid
View
Reroom logo
Design

Reroom

Transform rooms with AI-generated designs.

Freemium
View
Jife logo
Design

Jife

Transform Your Space with AI-Powered Japanese Interior Designs by Jife

Paid
View
Visily logo
Design

Visily

AI-powered wireframes for non-designers.

Free
View

Revolutionize Property Viewing with AI-Generated Floor Plans and Virtual Tours

Paid
View
Archsynth logo
Design

Archsynth

Transform sketches into stunning architectural renders with AI.

Paid
View