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(bypass): find headings in iframes #2310

Merged
merged 14 commits into from
Jul 1, 2020
Merged

fix(bypass): find headings in iframes #2310

merged 14 commits into from
Jul 1, 2020

Conversation

straker
Copy link
Contributor

@straker straker commented Jun 18, 2020

I needed to modify the bypass matches function to only look for anchor elements on the top level. Inside iframes we should still run and find any bypassable blocks.

The iframe tests were mostly copied from page-has-heading-one integration tests.

Closes issue: #2105

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Follows the commit message policy, appropriate for next version
  • Code is reviewed for security

@straker straker requested a review from a team as a code owner June 18, 2020 16:56
Copy link

@axe-linter axe-linter bot left a comment

Choose a reason for hiding this comment

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

Please fix the aforementioned accessibility errors

Copy link

@axe-linter axe-linter bot left a comment

Choose a reason for hiding this comment

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

Please fix the aforementioned accessibility errors

jeeyyy
jeeyyy previously requested changes Jun 19, 2020
lib/rules/bypass.json Outdated Show resolved Hide resolved
Comment on lines +5 to +6
if (windowIsTopMatches(node)) {
return !!node.querySelector('a[href]');
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm kind of confused about what you are trying to accomplish here. I don't see how pages having native links is relevant to whether or not they need a mechanism for bypassing repeating content.

Copy link
Contributor Author

@straker straker Jun 19, 2020

Choose a reason for hiding this comment

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

The original matches function required a page link before testing the entire page. Without one, the iframes (which don't have anchors) would not be tested for headings or landmarks. As to why we require the link in the first place, I have no idea.

lib/rules/bypass.json Outdated Show resolved Hide resolved
@straker straker dismissed stale reviews from WilcoFiers and jeeyyy June 19, 2020 17:08

Resolved

Copy link

@axe-linter axe-linter bot left a comment

Choose a reason for hiding this comment

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

Please fix the aforementioned accessibility errors

Copy link

@axe-linter axe-linter bot left a comment

Choose a reason for hiding this comment

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

Please fix the aforementioned accessibility errors

- CHANGELOG.md
- test/**/*
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs a separate PR.

Copy link

@axe-linter axe-linter bot left a comment

Choose a reason for hiding this comment

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

Please fix the aforementioned accessibility errors

@straker straker merged commit 7c23dbd into develop Jul 1, 2020
@straker straker deleted the bypass-iframes branch July 1, 2020 15:37
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.

4 participants