Skip to content
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(checks/unsupportedrole): support unsupported dpub and fallback roles, add role to message #3395

Merged
merged 53 commits into from
Feb 28, 2022

Conversation

dan-tripp
Copy link
Contributor

fix(rules): unsupportedrole check bugs

Closes issue #3282

dan-tripp and others added 30 commits August 19, 2021 21:17
Make `internal-link-present-evaluate` work with virtualNode rather than actualNode.

Closes issue dequelabs#2466
This reverts commit 428e015, reversing
changes made to 9f996bc.
This reverts commit 9f996bc.
@dan-tripp dan-tripp requested a review from a team as a code owner February 21, 2022 23:41
Copy link
Contributor

@straker straker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pr. Overall it looks good, the only request I have is that we'll want to check the checkContext._data to ensure that the role is set (since we weren't setting it before).

So for tests that return true, we'll check that the role is set:

assert.deepEqual(checkContext._data, [role]);

and for tests that return false, we'll want to check that it's null

assert.isNull(checkContext._data);

See https://github.com/dequelabs/axe-core/blob/develop/test/checks/aria/deprecatedrole.js for examples of doing this.

@dan-tripp
Copy link
Contributor Author

That makes sense. I like axe-core's test philosophy. Does my latest push reflect what you have in mind?

Copy link
Contributor

@straker straker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! Looks great.

Approved for security.

@straker straker changed the title fix(rules): unsupportedrole check bugs fix(checks/unsupportedrole): support unsupported dpub and fallback roles, add role to message Feb 28, 2022
@straker straker merged commit 3c0f10f into dequelabs:develop Feb 28, 2022
@dan-tripp
Copy link
Contributor Author

Nice. Thanks again for the guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants