Skip to content

Commit 9d4bd57

Browse files
anaskimAna Sollano Kim
andauthored
[Button Activation Behaviors] Scope goals and add non-goal (#1176)
* Scope and add non-goal * nits --------- Co-authored-by: Ana Sollano Kim <ansollan@microsoft.com>
1 parent e74d9c6 commit 9d4bd57

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ElementInternalsType/explainer.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ Currently, web developers face challenges when trying to implement these behavio
2222
This proposal addresses these challenges by introducing a standardized way for custom elements to opt into specific button activation behaviors through a simple static property declaration. By building on the established pattern of [form-associated custom elements](https://html.spec.whatwg.org/dev/custom-elements.html#form-associated-custom-elements), this approach provides a familiar developer experience while ensuring cross-browser compatibility and proper integration with platform features like the [Invoker Commands API](https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API).
2323

2424
### Goals
25-
- A solution to support key button activation use cases, particularly command invocation and form submission
25+
- A solution to support key button activation use cases, particularly command invocation.
2626

2727
### Non-goals
2828
- Providing an alternative to the customized built-in solution (`extends` and `is`), i.e., enabling a custom element to do everything a native button does.
2929
- A declarative version of this proposal. This requires finding a general solution for declarative custom elements, which should be explored separately.
30+
- Providing guidance on how to indicate that new behavior has been added to an element, which is discussed [here](https://github.com/WICG/webcomponents/issues/1029).
3031

3132
## Proposal: add static `buttonActivationBehaviors` property
3233
We propose enabling web component authors to create custom elements with button activation behaviors by adding a static `buttonActivationBehaviors` property to their custom element class definition.

0 commit comments

Comments
 (0)