[carousel] Special handle originating element for ::scroll-marker focus #57096
+1
−11
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.
If the initial starting element is a non-focusable element with
scroll-marker pseudo-element, we should not continue to search for next
focusable element, as we reach that non-focusable element from the
::scroll-marker pseudo-element via a special path in
Document::SequentialFocusNavigationStartingPoint, and once we reach
here, it's basically the same condition as tab_index being 0.
The test change is due to ::scroll-marker's specific behaviour which
can change the focused element. When other pseudo-elements will be made
focusable, the test will be updated.
Fixed: 459088197
Change-Id: I9f0c5c5d20457e4fea529442e76b7ebf9a9170a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7280304
Commit-Queue: Daniil Sakhapov <[email protected]>
Reviewed-by: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1566853}