aria_role
Elements with ARIA roles must use a valid, non-abstract ARIA role
User impact: Serious
This rule supports the following configuration:
- TOML
- Shell
# All role attributes must be valid.aria_role = true# All role attributes must match the provided listaria_role = [ "search", "presentation", "alert",]
# All role attributes must be valid.curlylint --rule 'aria_role: true' .# All role attributes must match the provided listcurlylint --rule 'aria_role: ["search", "presentation", "alert"]' .
#
Success- TOML
- Shell
<!-- Good: Valid role provided --><!-- aria_role = true --><form role="search"></form><!-- Good: Role matches provided options --><!-- aria_role = [ "table", "search", "presentation",] --><form role="search"></form>
<!-- Good: Valid role provided --><!-- curlylint --rule 'aria_role: true' . --><form role="search"></form><!-- Good: Role matches provided options --><!-- curlylint --rule 'aria_role: ["table", "search", "presentation"]' . --><form role="search"></form>
#
Fail- TOML
- Shell
<!-- Bad: Invalid role --><!-- aria_role = true --><form role="potato"></form><!-- Bad: Role does not match provided options --><!-- aria_role = [ "table", "alert", "presentation",] --><form role="search"></form>
<!-- Bad: Invalid role --><!-- curlylint --rule 'aria_role: true' . --><form role="potato"></form><!-- Bad: Role does not match provided options --><!-- curlylint --rule 'aria_role: ["table", "alert", "presentation"]' . --><form role="search"></form>