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: exclude noscript and template from dom.isVisible #1253

Closed
wants to merge 2 commits into from

Conversation

jeeyyy
Copy link
Contributor

@jeeyyy jeeyyy commented Nov 21, 2018

PR does the below:

  • excludes NOSCRIPT and TEMPLATE when computing isVisible.

Closes issue: #864

Reviewer checks

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

  • Follows the commit message policy, appropriate for next version
  • Has documentation updated, a DU ticket, or requires no documentation change
  • Includes new tests, or was unnecessary
  • Code is reviewed for security by: << Name here >>

@jeeyyy jeeyyy requested a review from a team as a code owner November 21, 2018 17:10
Copy link
Contributor

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

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

Please add an integration test to show this is actually fixing the problem in this rule.

@@ -58,6 +58,8 @@ dom.isVisible = function(el, screenReader, recursed) {
style.getPropertyValue('display') === 'none' ||
nodeName.toUpperCase() === 'STYLE' ||
nodeName.toUpperCase() === 'SCRIPT' ||
nodeName.toUpperCase() === 'NOSCRIPT' ||
nodeName.toUpperCase() === 'TEMPLATE' ||
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest an array.includes solution instead of adding even more "or" cases.

Copy link
Contributor

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

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

Nope, the other button.

@jeeyyy
Copy link
Contributor Author

jeeyyy commented Nov 23, 2018

Issue not reproducible, so closing the irrelevant PR.

@jeeyyy jeeyyy closed this Nov 23, 2018
@jeeyyy jeeyyy deleted the fix-region-noscript branch November 28, 2018 10:13
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