Repository navigation
[focusgroup] Switch to token list, allow behavior tokens to not be the first token - #1450
Merged
Merged
Conversation
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.
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.
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.
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.
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.
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.
janewman
marked this pull request as ready for review
May 26, 2026 17:30
janewman
requested review from
gregwhitworth,
keithamus,
lukewarlow,
mfreed7 and
travisleithead
as code owners
May 26, 2026 17:30
lukewarlow
approved these changes
May 26, 2026
Collaborator
Author
|
@lukewarlow thanks for the quick review! |
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.
Updates the following to match the latest iteration of whatwg/html#11723