Created attachment 464607 [details] A video of the bug Found another bug that might be related to https://bugs.webkit.org/show_bug.cgi?id=250999 When using VoiceOver to navigate (swipe right gesture) a page with scroll-snap on :root, the wrong element will sometimes snap to the viewport. I have tried to recreate a minimal example here: https://codepen.io/johannesodland/pen/QWBQQoM (The example must be tested in debug mode / full screen. It does not work if run in an iframe. ) Expected result: After using VoiceOver to navigate to an element, that element should stay in the viewport. Actual result: After using VoiceOver to navigate to an element, then a different element snaps to the viewport effectively pushing the element with VoiceOver focus out of the viewport. This breaks navigation for the user. If they use touch navigation from here they will reach content on another part of the page, and not where they navigated to. Observations: - It is sometimes possible to see the element with VoiceOver focus being scrolled into the viewport in one frame, before it disappears and another element is snapped into place. - I have experienced VoiceOver navigation breaking down after seeing this bug, similar to https://bugs.webkit.org/show_bug.cgi?id=250999. I have marked this bug with `Severity: Major` as this affects Accessibility / VoiceOver navigation. Feel free to adjust the severity as fit.
<rdar://problem/104549964>
Might be related to https://bugs.webkit.org/show_bug.cgi?id=245722 where scrollIntoView fails after the browser interface has retracted.
Retested on iOS Safari 16.4. The issue still persists. I have moved the test case to a new location for easier testing. Here is the URL: https://johannesodland.github.io/browserbugs/safari-scroll-snap-voice-over-snaps-to-wrong-element-issue.html
Retested on iOS 16.5 The issue is still present.
Retested on iOS 17. Still snaps to wrong element, with the correct element ending up outside the viewport.
Retested in iOS 17.4. Some of the focused elements still end up outside the viewport.