Clarify situation where an element is not meaningfully visible
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 718
- Forks
- 228
- PR merge metrics
- No merged PRs in 30d
Description
In chapter 12. Elements, section 12.1 Interactability:
An element is in view if it is a member of its own pointer-interactable paint tree, given the pretense that its pointer events are not disabled.
This discusses where an element is visible in any way, however there are many situations where an element is not meaningfully visible. For example where between only 0-1px of the element is visible. In this situation, the pointer-interactable tree produces a DOMRect with a width or height of less than 1px and therefore the element is considered to be in view, and will not be scrolledIntoView at step 5 of the elementClick. Whilst drivers should be able to click, this is much more likely to lead to obscure bugs ([1], [2], [3] for example), and is not representative of how a real user would interact with the browser.
I would suggest that this consider whether an element is meaningfully visible - perhaps by requiring that at least 1px of it be visible for example.
[1] https://bugs.chromium.org/p/chromedriver/issues/detail?id=3682
[2] https://bugs.chromium.org/p/chromedriver/issues/detail?id=3878
[3] https://bugs.chromium.org/p/chromedriver/issues/detail?id=3933
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with chapter 12, especially section 12.1 Interactability and the elementClick algorithm's step 5. Review the referenced ChromeDriver issues and the pointer-interactable paint tree behavior for elements with less than 1px of visible width or height. Done means the specification clearly defines whether such elements are meaningfully visible and how scrolling and clicking should handle them.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100