act-rules / act-rules.github.io

Accessibility conformance testing rules for HTML
https://act-rules.github.io/
Other
136 stars 68 forks source link

Rule idea: role is permitted for element #2042

Open WilcoFiers opened 1 year ago

WilcoFiers commented 1 year ago

The gist of it is to test that the explicit role is allowed on the element. This would test requirements outlined in HTML in ARIA

https://www.w3.org/TR/html-aria/#docconformance

Example: <button role="heading"> would not be allowed because the button element is only allowed to have certain roles.