-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make global ARIA attributes configurable in aria-allowed-attr #2108
Comments
QA: to test this you can take a rule such as For example, the checkbox role allows attributes <div role="checkbox" aria-expanded="true" aria-checked="true"></div>
<script>
axe.configure({
standards: {
// the standards object to configure https://github.com/dequelabs/axe-core/blob/develop/lib/standards
ariaRoles: {
// the role to configure
checkbox: {
// the property to configure. with arrays you'll need to copy what's in the standards
// object and add the new values, otherwise the previous values will be removed
// (meaning `aria-checked`, etc. would no longer be allowed)
allowedAttrs: ['aria-checked', 'aria-readonly', 'aria-required', 'aria-expanded']
}
}
}
});
</script>
await axe.run(); // so not show violation for `aria-allowed-attrs` for `aria-expanded` on the checkbox role You should also test other rules in a similar manner such as |
Included in internal release notes 7/27/2020 |
To make axe-core more flexible and allow it to support different environments it would be helpful to add more configuration options. One such option is to be able to set which global attributes are available in aria-allowed-attr, see #2078 for details.
The text was updated successfully, but these errors were encountered: