Interactive components have accessible name, role, and value
Why it matters
Custom interactive components that lack accessible names, roles, or state expose AT users to components they cannot identify or operate. A screen reader encountering a nameless div with an onClick handler reads nothing useful; a toggle without aria-checked gives no feedback on state. WCAG 2.2 SC 4.1.2 (Name, Role, Value) is Level A — failures break keyboard and AT navigation entirely, affecting users of VoiceOver, NVDA, and JAWS, plus voice control users who activate elements by speaking their visible label.
Severity rationale
Critical because components with no accessible name or role are invisible or unpredictable to screen reader users, breaking core functionality and violating WCAG 2.2 SC 4.1.2 at the most foundational Level A.
Remediation
Prefer native HTML elements that carry implicit semantics. When building custom components, always supply all three ARIA pillars — name, role, and state.
// Custom toggle — explicit role + name + live state
<div
role="switch"
aria-checked={isEnabled}
aria-label="Enable email notifications"
tabIndex={0}
onClick={() => setIsEnabled(v => !v)}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') setIsEnabled(v => !v)
}}
/>
// Dropdown trigger — name from visible text + state
<button aria-haspopup="listbox" aria-expanded={isOpen}>
Sort by
</button>
For every custom component in your codebase, verify it exposes name via aria-label or visible text, role via a semantic element or explicit role=, and relevant state via the matching aria-* attribute.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Accessibility WCAG Compliance Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- wcag:2.2 · 4.1.2 — Name, Role, Value
- wcag:2.2 · 1.3.1 — Info and Relationships
- section-508:2018-refresh · 502.3.3 — Values
Taxons
History
- 2026-04-18·v1.0.0·Initial import from accessibility-wcag·automated