{{ message }}
script: Add support for focus navigation scopes#44684
Merged
mrobinson merged 1 commit intoMay 7, 2026
Merged
Conversation
|
Test results for linux-wpt from try job (#25447134705): Flaky unexpected result (35)
Stable unexpected results that are known to be intermittent (22)
|
|
✨ Try run (#25447134705) succeeded. |
Member
|
I'll review this tonight. |
jdm
approved these changes
May 7, 2026
jdm
left a comment
Member
There was a problem hiding this comment.
I appreciate all the documentation and naming choices in this PR!
| #[derive(PartialEq)] | ||
| pub(crate) enum SequentialFocusNavigationSearchContext { | ||
| /// The focus scope that initiated this search. Containing contexts and nested contexts can | ||
| /// be both be searched. |
Member
There was a problem hiding this comment.
Suggested change
| /// be both be searched. | |
| /// both be searched. |
| should_continue | ||
| } | ||
|
|
||
| /// Process the node or focus scope owner with the provided tab index for according to this |
Member
There was a problem hiding this comment.
Suggested change
| /// Process the node or focus scope owner with the provided tab index for according to this | |
| /// Process the node or focus scope owner with the provided tab index according to this |
| } | ||
| } | ||
|
|
||
| /// Process the node or focus scope owner with the provided tab index for searches with the |
Member
There was a problem hiding this comment.
I think the "provided tab index" bit might be a copy-paste? It doesn't seem to be relevant here.
| fn process_element_for_first_or_last_traversal( | ||
| &self, | ||
| candidate_element_tab_index: i32, | ||
| ) -> (bool, Continue) { |
Member
There was a problem hiding this comment.
It looks like we always return Continue::Yes. Is it useful to return a Continue value in that case?
Add support for the specification's concept of focus navigation scopes. Effectively tab indices are only considered relative to each other within the same shadow host, slot, or document. Focus can move from a containing scope to a nested one and vice-versa, but with the following caveats: - When searching a nested scope, the traversal works like a sequential traversal without a starting point. - When searching a containing scope, the tab index of the scope owner is used to evaluate candidates. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
b5e8b93 to
b7c2d40
Compare
Member
Author
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.

Add support for the specification's concept of focus navigation scopes.
Effectively tab indices are only considered relative to each other
within the same shadow host, slot, or document. Focus can move from a
containing scope to a nested one and vice-versa, but with the following
caveats:
traversal without a starting point.
is used to evaluate candidates.
Testing: This change causes some WPT tests to start to pass.