Skip to content

Address WHATNOT 2025 feedback on Platform-Provided Behaviors#1318

Open
anaskim wants to merge 3 commits into
MicrosoftEdge:mainfrom
anaskim:platform-provided-behaviors-whatnot-feedback
Open

Address WHATNOT 2025 feedback on Platform-Provided Behaviors#1318
anaskim wants to merge 3 commits into
MicrosoftEdge:mainfrom
anaskim:platform-provided-behaviors-whatnot-feedback

Conversation

@anaskim
Copy link
Copy Markdown
Member

@anaskim anaskim commented May 8, 2026

Update the Platform-Provided Behaviors explainer in response to the WHATNOT 5/7

Ana Sollano Kim added 2 commits May 8, 2026 15:34
Update the Platform-Provided Behaviors explainer in response to the
WHATNOT 2025 discussion and the related issues whatwg/html#11061 and
WICG/webcomponents#814.

- Restructure the "Prior community feedback" section. Lead with the
  two most substantive threads (MicrosoftEdge#814 and #11061), pair each piece of
  feedback with the specific design choice that responds to it, and
  expand the reply to whatwg/html#11061 comment 3213526709: stay
  within the existing ElementInternals decomposition pattern used by
  form-associated custom elements and ARIAMixin, present `behaviors`
  as a list (not a singular `type` string) so an element can remix
  multiple behaviors, keep `static formAssociated = true` so
  inheritance still works, and scope the behavior to form submission
  only.

- Add a "Behaviors are not opaque tokens" subsection that responds to
  the obscurity criticism: each behavior maps to a single existing
  native pattern, is fully specified in terms of existing HTML
  algorithms, and its individual defaults can be overridden via
  primitives.

- Refine Alternative 7 (Low-level primitives on `ElementInternals`)
  with a layering example showing how `HTMLSubmitButtonBehavior`
  would compose with concrete primitive overrides if those were
  available, including a four-state `internals.focusable` enum from
  WICG/webcomponents#762 and a `keyboardActivation` primitive. The
  example argues why the smaller primitives cannot ship in isolation
  yet without risking accessibility and form-submission correctness.

- Drop "bundle"/"bundling"/"bundled" wording where it described
  `HTMLSubmitButtonBehavior` in our own voice; keep it where the
  word is itself the criticism being summarized.

- Drop the stale "Status of the original WICG issue" and "ARIA
  Working Group" subsections; their content is captured in the
  rewritten feedback section.
@anaskim anaskim force-pushed the platform-provided-behaviors-whatnot-feedback branch from 75e56ea to 4f59759 Compare May 11, 2026 19:55
@anaskim anaskim marked this pull request as ready for review May 11, 2026 20:37
@anaskim anaskim requested review from dandclark and leotlee May 11, 2026 20:39
Comment thread PlatformProvidedBehaviors/explainer.md Outdated
- Activation ordering: Form submission runs as part of the [activation behavior](https://dom.spec.whatwg.org/#eventtarget-activation-behavior), which interacts with the `click` event in a specific order with respect to `preventDefault`. Authors hand-wiring a `click` listener get this ordering wrong in subtle ways.
- Future-proofing: When HTML adds a new requirement to submit buttons (a new IDL attribute, a new constraint-validation hook, a new accessibility computation), web authors have to discover and re-wire each addition.

The behavior and primitive layers can also be used together. If low-level primitives were to ship on `ElementInternals` alongside this proposal, an author who wants the full submission capabilities but needs to deviate from one default does not have to reimplement everything: they attach `HTMLSubmitButtonBehavior` for the form submission semantics and then override the specific primitive they care about.
Copy link
Copy Markdown
Member

@dandclark dandclark May 13, 2026

Choose a reason for hiding this comment

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

IMO this paragraph and the example following it aren't necessary. You already made this point above (starting with "Platform-provided behaviors does not reject primitives...").

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Cut the paragraph. Kept the example since folks at WHATNOT asked to see how HTMLSubmitButtonBehavior would layer with primitive overrides, and trimmed the intro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants