Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: clean up small parts of sequential focus navigation #10632

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

domfarolino
Copy link
Member

@domfarolino domfarolino commented Sep 18, 2024

The sequential focus navigation infrastructure could likely use a revamping, but before this is accomplished, this PR attempts to clean up some low-hanging fruit by:

  • Getting rid of confusing concepts like "home document" and "home sequential navigation focus order" which are definitions that appear mid-algorithm, and are likely not necessary in general
  • Clean up implicit flag-like variables by making them more explicit enums
  • Clarifying algorithm parameter types and return types
  • Clean up wrapping
  • Specifying that the "DOM" selection mechanism entails tree order
  • Clean up recursive invocations of the sequential navigation search algorithm

/interaction.html ( diff )

@domfarolino domfarolino marked this pull request as ready for review September 18, 2024 16:11
data-x="selection-mechanism-sequential">sequential</code>"
<td>Let <var>candidate</var> be the first <span>suitable sequentially focusable area</span>
after <var>starting point</var>, in <var>starting point</var>'s <code>Document</code>'s
<span>sequential focus navigation order</span>, if any; or else null
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my question in the WHATWG matrix chat about this. I'm concerned that the old spec (and thus the spec after this PR) have no material difference between "DOM" and "sequential" selection mode. The note below the home sequential focus navigation order dfn says the only difference is that in the "DOM" selection mode, <var>starting point</var> is not in its own Document's sequential focus navigation order. But that shouldn't actually impact the assignment of <var>candidate</var>, since candidate will always be selected from the starting point's sequential focus navigation order anyways.

So I'm not sure what to do here. Either I am right, and there is no observable difference between the two mechanisms in this case, or it is the intention of the spec to have a difference between the two. I.e., maybe:

  • In the "DOM" case, <var>candidate</var> should be pulled from the DOM in tree order relative to starting point (not necessarily coming from the starting point's Document's "sequential focus navigation order"
  • In the "sequential" case, <var>candidate</var> should be pulled from the subset of the DOM that is included in the starting point's Document's "sequential focus navigation order"

@domfarolino domfarolino requested review from domenic and removed request for annevk September 19, 2024 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant