docs: fast visibility now supports Shadow DOM with documented caveats#6435
Open
mschile wants to merge 1 commit intomschile/fast-visibility-scroll-into-viewfrom
Open
docs: fast visibility now supports Shadow DOM with documented caveats#6435mschile wants to merge 1 commit intomschile/fast-visibility-scroll-into-viewfrom
mschile wants to merge 1 commit intomschile/fast-visibility-scroll-into-viewfrom
Conversation
Mirrors cypress-io/cypress#33737, which makes the `experimentalFastVisibility` algorithm shadow-DOM aware. Five test scenarios still diverge from the legacy algorithm because of fast's reliance on `elementFromPoint` — they fall into three buckets: 1. Cover detection where the cover is narrower than the underneath element (corner sampling vs center-only). 2. `pointer-events: none` on the subject (browsers skip such elements in `elementFromPoint`, so no sample lands on them). 3. A clipping ancestor between the subject and its containing block (legacy uses `offsetParent` rules to ignore it). Document each in the Limitations section. Also refine the existing clipping-ancestor paragraph to (a) cover all four clipping `overflow` values, (b) note that in-bounds-but-below-fold subjects are scrolled normally, and (c) state that the check now walks shadow root boundaries. Pairs with cypress-io/cypress#33737.
2 tasks
cypress-documentation
|
||||||||||||||||||||||||||||||||||||||||
| Project |
cypress-documentation
|
| Branch Review |
mschile/pensive-black-034995
|
| Run status |
|
| Run duration | 05m 39s |
| Commit |
|
| Committer | Matthew Schile |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
322
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
47.51%
|
|
|---|---|
|
|
337
|
|
|
3
|
Accessibility
96.88%
|
|
|---|---|
|
|
1 critical
3 serious
4 moderate
1 minor
|
|
|
35
|
cacieprins
approved these changes
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pairs with cypress-io/cypress#33737, which makes the
experimentalFastVisibilityalgorithm shadow-DOM aware (resolves cypress-io/cypress#33046).This PR is stacked on top of #6434 because it builds on that branch's clipping-ancestor docs.
What changed
experiments.mdxandinteracting-with-elements.mdx) with the new state: Shadow DOM is now supported. The remaining divergences from the legacy algorithm are documented as three concrete buckets, all rooted in fast's reliance onelementFromPoint:pointer-events: noneon the subject — browsers skip such elements inelementFromPoint, so no sample point can land on them. Settingpointer-events: autoon the subject is the workaround.offsetParentrules to ignore that ancestor; fast does not.overflowvalues (hidden,clip,scroll,auto), (2) note that in-bounds subjects merely below the fold are scrolled into view normally, and (3) state that the check now walks shadow root boundaries.Steps to test
Render the docs locally and visit:
docs/app/references/experiments#Experimental-Fast-Visibility— confirm the caution block now points at the Limitations section.docs/app/core-concepts/interacting-with-elements#Experimental-Fast-Visibility— confirm the Limitations bullets describe the three caveats and the clipping-ancestor paragraph reads correctly.Note
Low Risk
Low risk: documentation-only updates that clarify behavior and known edge cases of
experimentalFastVisibility, with no runtime or API changes.Overview
Docs update for
experimentalFastVisibility: Shadow DOM is now documented as supported, replacing the previous “not supported” limitation and adding concrete caveats tied toelementFromPoint(corner-only visibility,pointer-events: none, and clipping-ancestor semantics).Clarifies scrolling/clipping behavior for
overflow: hidden|clip|scroll|auto, including that in-bounds-but-offscreen subjects still scroll into view and that clipping checks traverse shadow roots, and updates the experiments page to link readers to the detailed limitations section.Reviewed by Cursor Bugbot for commit 2aa82d6. Bugbot is set up for automated code reviews on this repo. Configure here.