Repository navigation
Conversation
|
Opening up for review, but please keep in mind this is an early draft. |
|
@annevk, during TPAC you expressed interest in taking a look at this draft spec change - I would really appreciate any feedback you had as I work to move this towards something we think accurately captures the behavior and fits in with the existing logic. |
|
It is unclear to me what happens if the page has keydown, or keyup event listener and calls preventDefault() when arrow key is used. Which event listener has some affect and which doesn't? |
…ng section, improve segment definition with example, and simplify key conflict element handling
I've added a new section that should answer all of these questions, please let me know what you thank and if it still isn't clear. |
- Lowercase the focusgroup attribute value upfront in the state algorithm (matches the blocking attribute pattern), so subsequent token comparisons are exact - Use linked Directional Navigation references in concept-related prose (modifier table descriptions, attributes index, examples) - Drop tutorial-style "Each segment operates independently" bullets and the inaccurate horizontal-scrolling bullet from examples - Replace "enables" with "provides" in opening attribute definition; trim "automatically configure the correct axis and wrapping" from menubar example intro
I've stripped out the ARIA sections from here, these concepts will live in w3c/aria#2778 |
Really appreciate the feedback! Let me know what you think of the latest. |
- Wrap: use "exactly one of nowrap or wrap" framing so non-conforming (both present) falls into the same "otherwise" branch as neither, using the behavior default - Axis: state directly that both inline and block means Directional Navigation operates on both axes; reword DN's axis check to test whether effective modifiers restrict DN to an axis other than the one being navigated, rather than testing for a specific opposite token in the effective modifier set
- Trim "What to notice" in tablist example to a single terse paragraph - Use "focus group" (concept) consistently in prose where "focusgroup" referred to the concept rather than the attribute - Drop non-keyboard-modifier-key note (UA discretion is implicit)
…e first token (#1450) * [focusgroup] Update explainer to match whatwg/html#11723 Aligns the explainer's Feature detection section with the IDL landed in whatwg/html#11723: focusGroup as a DOMTokenList and focusGroupStart as a boolean, both on the HTMLOrSVGElement mixin. Adds a short DOMTokenList ergonomics example so authors know they can use .add/.toggle/.contains/.remove rather than parsing the attribute value. Links the WHATWG PR from the intro metadata and refreshes the Last updated date. * fixup: align Feature detection prose with new IDL casing Customs review iteration 1: prose at line 837 referred to a `focusgroup` property (lowercase) but the IDL the previous commit introduced declares `focusGroup` (camelCase) and adds a separate `focusGroupStart` boolean. Rewrites the sentence to name both IDL properties correctly and distinguish them from the content-attribute names. Adds one bridging sentence noting that direct string assignment continues to work alongside the DOMTokenList methods. * fixup: reword string-assignment note for register Customs review iteration 2: RR1 (spec-accuracy) and RR3 (prose-voice) independently flagged "still works" as conversational and as assuming the reader knew the prior DOMString IDL. Rewrites the sentence in the spec-adjacent register used by the rest of the section. * fixup: remove DOMTokenList ergonomics section Drops the per-token API discussion (Because focusGroup is a DOMTokenList... plus the JS example) and the readonly/PutForwards string-assignment note. Both patterns are well known to authors who reach for the IDL, and removing them keeps the Feature detection section focused on the new IDL surface. * fixup: drop enforced token-order claims Token order in the focusgroup attribute is not significant per the spec PR algorithm — only the SET of tokens matters. The explainer previously implied an order requirement in several places (mostly via "first token" phrasings used to mean "the behavior token"). Replaces those with "behavior token" where the meaning was semantic, drops the explicit "Order: first token MUST be ..." claim in the Index of focusgroup values, softens the Authoring guidance "Put the behavior token first" imperative to a readability recommendation, and notes "in any order" in the Focusgroup tokens introduction. * fixup: clarify token-order convention in Focusgroup tokens intro The bracket notation immediately after the intro sentence shows tokens in a conventional order (behavior, axis, wrap, memory); the rewritten intro labels that order as conventional and explicitly states any order is valid.
Align the focusgroup attribute parsing with the formal "determine the focusgroup state" algorithm defined in the HTML spec PR: whatwg/html#11723. With this change, "none" and the behavior token can appear at any position. Before, the these were required to be the first token or parsing would fire an error. Bug: 40210717 Change-Id: Ic258d4fc39f9850c5cabac2b4afa0dbcf6c32d95 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7871960 Commit-Queue: Jacques Newman <[email protected]> Reviewed-by: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1637192}
Align the focusgroup attribute parsing with the formal "determine the focusgroup state" algorithm defined in the HTML spec PR: whatwg/html#11723. With this change, "none" and the behavior token can appear at any position. Before, the these were required to be the first token or parsing would fire an error. Bug: 4021071 Change-Id: Ic258d4fc39f9850c5cabac2b4afa0dbcf6c32d95 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7871960 Commit-Queue: Jacques Newman <[email protected]> Reviewed-by: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1637192}
…latest spec draft, a=testonly Automatic update from web-platform-tests [focusgroup] Align ParseFocusgroup with latest spec draft Align the focusgroup attribute parsing with the formal "determine the focusgroup state" algorithm defined in the HTML spec PR: whatwg/html#11723. With this change, "none" and the behavior token can appear at any position. Before, the these were required to be the first token or parsing would fire an error. Bug: 40210717 Change-Id: Ic258d4fc39f9850c5cabac2b4afa0dbcf6c32d95 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7871960 Commit-Queue: Jacques Newman <[email protected]> Reviewed-by: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1637192} -- wpt-commits: ea921feb8d626629aebe857e774864f8679f0977 wpt-pr: 60231
keithamus
left a comment
There was a problem hiding this comment.
Some high level commentary. I will be back with more tomorrow.
keithamus
left a comment
There was a problem hiding this comment.
Okay, another review pass, this time checking against tests. I think I see some ambiguities or at least clarifications.
Really appreciate the review feedback! I'll be leaving for vacation at the end of this week but I'll try to push an update to address these before then. if I don't this will definitely be one of my priorities when I return. Apologies in advance for any delays on my part! |
|
@janewman https://gist.github.com/annevk/3dc3459e443cdb515c34692f0f8d3406 has an AI review of this feature. (I haven't checked it in detail, but it seems to be mostly doing a good job at identifying real problems across a wide variety of HTML PRs.) |
…latest spec draft, a=testonly Automatic update from web-platform-tests [focusgroup] Align ParseFocusgroup with latest spec draft Align the focusgroup attribute parsing with the formal "determine the focusgroup state" algorithm defined in the HTML spec PR: whatwg/html#11723. With this change, "none" and the behavior token can appear at any position. Before, the these were required to be the first token or parsing would fire an error. Bug: 40210717 Change-Id: Ic258d4fc39f9850c5cabac2b4afa0dbcf6c32d95 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7871960 Commit-Queue: Jacques Newman <[email protected]> Reviewed-by: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1637192} -- wpt-commits: ea921feb8d626629aebe857e774864f8679f0977 wpt-pr: 60231
#11641
This adds the
focusgroupattributes needed to allow for declarative focus navigation using the directional navigation (arrow keys, d-pad).This specs the behavior detailed in the explainer on OpenUI.
/dom.html ( diff )
/index.html ( diff )
/indices.html ( diff )
/infrastructure.html ( diff )
/interaction.html ( diff )