ARIA (Accessible Rich Internet Applications)
// Definition
A W3C specification that adds roles, states, and properties to HTML elements to expose semantics to assistive technologies when native HTML alone is insufficient. The first rule of ARIA is: do not use ARIA — prefer native HTML elements (button, input, nav) that carry the correct semantics implicitly. Incorrect ARIA can make an interface less accessible than no ARIA at all. QA testers check that ARIA roles match the component's actual behaviour, required states (aria-expanded, aria-selected, aria-checked) update dynamically, and aria-label or aria-labelledby provides meaningful names for elements that lack visible text.
// Why it matters
ARIA adds roles, states, and properties so assistive tech can understand custom widgets that native HTML can't express. The QA twist: the first rule of ARIA is don't use ARIA if a native element works. Bad ARIA is worse than none — it actively lies to screen-reader users. So testing is as much "is this ARIA wrong?" as "is it present?".
// How to test
// Verify roles/states reflect actual UI state
cy.get('[data-cy=menu-toggle]').should('have.attr', 'aria-expanded', 'false')
cy.get('[data-cy=menu-toggle]').click()
cy.get('[data-cy=menu-toggle]').should('have.attr', 'aria-expanded', 'true')
cy.get('[data-cy=menu]').should('have.attr', 'role', 'menu')
// And confirm a real screen reader announces it (manual — axe can't hear)// Common mistakes
- Adding ARIA to elements that already have native semantics (redundant or conflicting)
aria-expanded/aria-checkedthat never updates when state changesrolewithout the keyboard interaction the role implies (arole=buttondiv that ignores Enter/Space)
// Related terms
Semantic HTML
The practice of using HTML elements according to their intended meaning — heading elements (h1–h6) for headings, button for interactive controls, nav for navigation regions, main for the primary content area — rather than using generic div and span elements for everything. Semantic elements convey role, structure, and sometimes state to browsers, search engines, and assistive technologies without requiring additional ARIA attributes. QA testers check that pages use a logical heading hierarchy, landmark regions are present, and interactive controls use native elements rather than div or span with click handlers.
Screen Reader
Assistive technology software that converts on-screen content into synthesised speech or Braille output, enabling users who are blind or have low vision to navigate and interact with digital interfaces. Common screen readers include NVDA and JAWS (Windows), VoiceOver (macOS and iOS), and TalkBack (Android). QA testers use screen readers to verify that interactive elements have meaningful names, heading and landmark structure is navigable, dynamic content changes are announced, and no information is conveyed visually only.
Accessibility
The practice of designing and testing software so it is usable by people with a wide range of abilities — including users who rely on screen readers, keyboard navigation, voice control, switch access, or high-contrast display modes. In QA, accessibility testing involves both automated scanning and manual verification. Automated tools (axe, Lighthouse, Accessibility Scanner for Android, Accessibility Inspector for iOS) catch structural issues such as missing labels, insufficient colour contrast, and incorrect ARIA roles — typically around a third of all accessibility issues. The remaining two-thirds require testing with actual assistive technologies: VoiceOver on iOS, TalkBack on Android, NVDA or JAWS on Windows. WCAG 2.1 AA is the most widely referenced standard; Level AA compliance is required by law in many jurisdictions (ADA, EN 301 549, AODA). Integrating accessibility checks into CI — for example, running axe as part of a Playwright or Selenium test suite — prevents regressions from being merged undetected.