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

Code quality improvements from isVisible refactor #3655

Closed
9 tasks done
straker opened this issue Sep 8, 2022 · 3 comments
Closed
9 tasks done

Code quality improvements from isVisible refactor #3655

straker opened this issue Sep 8, 2022 · 3 comments
Labels
pr A pr has been created for the issue tech debt Technical debt related tasks

Comments

@straker
Copy link
Contributor

straker commented Sep 8, 2022

From #3351, listing changes we can make to improve the code that we didn't want to make in the large pr

@straker
Copy link
Contributor Author

straker commented Sep 26, 2022

lib/commons/dom/get-rect-stack.js - may not need need width/height check if isVisibleOnScreen already does that (#3351 (comment))

The visibility methods do not look at the elements width/height. So the following DOM returns true for isVisibleOnScreen, so it is needed in get-rect-stack

<div style="width: 0; height: 0; padding: 0; margin: 0></div>

@straker
Copy link
Contributor Author

straker commented Sep 26, 2022

lib/rules/landmark-unique-matches.js - remove isVisibleForScreenreader call as it may not be useful (#3351 (comment))

This fails a test in landmark-unique-matches for the test should not match because landmark is hidden which sets the landmark to display: none and expects the matcher to fail.

@straker
Copy link
Contributor Author

straker commented Oct 17, 2022

All work completed

@straker straker closed this as completed Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr A pr has been created for the issue tech debt Technical debt related tasks
Projects
None yet
Development

No branches or pull requests

1 participant