Aria Label Required
Validates that interactive elements have an accessible name (computed via ARIA spec: aria-labelledby → aria-label → associated label → text → title).…
$ prime install @community/check-aria-label-required Projection
Always in _index.xml · the agent never has to ask for this.
AriaLabelRequired [check] v1.0.0
Validates that interactive elements have an accessible name (computed via ARIA spec: aria-labelledby → aria-label → associated label → text → title). Focuses on icon-only buttons/links, unlabeled inputs, and images without alt.
Loaded when retrieval picks the atom as adjacent / supporting.
AriaLabelRequired [check] v1.0.0
Validates that interactive elements have an accessible name (computed via ARIA spec: aria-labelledby → aria-label → associated label → text → title). Focuses on icon-only buttons/links, unlabeled inputs, and images without alt.
signature: (html: string, context?: object) -> CheckResult predicate: // Elements that MUST have an accessible name: // -
tag = el.tagName.toLowerCase() if tag === 'img' && el.getAttribute('alt') === null: yield { selector: cssPath(el), fail: 'img-missing-alt' } else if tag === 'img' && el.getAttribute('alt') === '': // Empty alt is valid for decorative images — skip continue else if tag === 'input' && el.type !== 'hidden' && el.type !== 'submit' && el.type !== 'button': // Submit/button get name from value yield { selector: cssPath(el), fail: 'input-no-accessible-name', remedy: 'wrap in
Validates
@community/rule-aria-label-required
Severity
critical
Failure Message Template
Element '{selector}' has no accessible name: {fail}. {remedy}. Without a name, screen readers announce only the element type (e.g. 'button').
Evaluation Method
automated
Tools
- axe-core
- lighthouse
- @testing-library/dom
False Positive Rate
low
Loaded when retrieval picks the atom as a focal / direct hit.
AriaLabelRequired [check] v1.0.0
Validates that interactive elements have an accessible name (computed via ARIA spec: aria-labelledby → aria-label → associated label → text → title). Focuses on icon-only buttons/links, unlabeled inputs, and images without alt.
signature: (html: string, context?: object) -> CheckResult predicate: // Elements that MUST have an accessible name: // -
tag = el.tagName.toLowerCase() if tag === 'img' && el.getAttribute('alt') === null: yield { selector: cssPath(el), fail: 'img-missing-alt' } else if tag === 'img' && el.getAttribute('alt') === '': // Empty alt is valid for decorative images — skip continue else if tag === 'input' && el.type !== 'hidden' && el.type !== 'submit' && el.type !== 'button': // Submit/button get name from value yield { selector: cssPath(el), fail: 'input-no-accessible-name', remedy: 'wrap in
Validates
@community/rule-aria-label-required
Severity
critical
Failure Message Template
Element '{selector}' has no accessible name: {fail}. {remedy}. Without a name, screen readers announce only the element type (e.g. 'button').
Evaluation Method
automated
Tools
- axe-core
- lighthouse
- @testing-library/dom
False Positive Rate
low
Validates
@community/rule-aria-label-required
Severity
critical
Failure Message Template
Element '{selector}' has no accessible name: {fail}. {remedy}. Without a name, screen readers announce only the element type (e.g. 'button').
Evaluation Method
automated
Tools
- axe-core
- lighthouse
- @testing-library/dom
False Positive Rate
low
Source
prime-system/examples/frontend-design/primes/compiled/@community/check-aria-label-required/atom.yaml