squirrelscan
GitHub

ARIA Required Parent

Checks that elements with certain roles have required parent roles

Checks that elements with certain roles have required parent roles

Rule ID a11y/aria-required-parent
Category Accessibility
Scope Per-page
Severity error
Weight 7/10

Solution

Some ARIA roles must be contained within specific parent roles. For example, role=‘listitem’ must be within role=‘list’, role=‘option’ must be within role=‘listbox’. Restructure your markup to ensure proper parent-child relationships.

Enable / Disable

Disable this rule

[rules]
disable = ["a11y/aria-required-parent"]

Disable all Accessibility rules

[rules]
disable = ["a11y/*"]

Enable only this rule

[rules]
enable = ["a11y/aria-required-parent"]
disable = ["*"]

Type to search…

↑↓ navigate↵ openesc close