-
Notifications
You must be signed in to change notification settings - Fork 779
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
fix(aria-allowed-attr): error when generic elements use aria-label and aria-labelledy #2766
Conversation
before(function() { | ||
axe._load({}); | ||
}); | ||
it('should return a list of role names by type', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got tired of updating this test when adding new roles. This should allow us to not have it change so often.
@@ -1,4 +1,4 @@ | |||
describe.only('aria-prohibited-attr', function() { | |||
describe('aria-prohibited-attr', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, odd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor tweak.
Co-authored-by: Wilco Fiers <[email protected]>
8d506d3
to
a7a2b2e
Compare
4521fb9
to
9f5efe3
Compare
Tested the following DOM in different browsers:
No browser / screen reader combination read the
aria-label
or thearia-labelledby
attributes. All names returned as "foo"Note: The "proper" way to handle this would be if axe-core returned
generic
instead ofnull
for nodes without a role. However, we are not set up to do that and It would require going through all use cases where we check fornull
role and changing it forgeneric
. I'm not sure we want to do that just yet, but we should at least add a tech debt ticket to do so if this is merged.Closes issue: #1575