[Draft] Introduce the new menu elements #12011
Draft
+1,158
−367
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.
This PR introduces the
<menubar>,<menulist>, and<menuitem>elements as they appear in Open UI's menu elements proposal: https://open-ui.org/components/menu.explainer/. This includes their integration with popovers, command invokers,<fieldset>and checkability, default styles, and variant default styles for the<menulist>element depending on how it is rendered. What has not been spec'd yet is:orientationattribute's effect on default styles and keyboard navigability<menulist>popovers). But to be consistent with customizable select, we're not planning on specifying the exact keyboard behavior for getting from one menulist to another in a menubar, or traversing through menu items in a menu bar or list. These will be covered by examples, notes, and.optionalWPTscheckedevent integration discussed in What event should fire on checkable menu items? openui/open-ui#1321akey to focus the first menuitem in a menulist that starts with the charactera)This PR is only a draft. It's suitable for stage 2 evaluation of the menu elements proposal tracked by #11729, but has rough edges and non-trivial TODOs. The API shape is just about fully expressed though.
(See WHATWG Working Mode: Changes for more details.)
/dom.html ( diff )
/form-elements.html ( diff )
/grouping-content.html ( diff )
/index.html ( diff )
/indices.html ( diff )
/infrastructure.html ( diff )
/interaction.html ( diff )
/interactive-elements.html ( diff )
/obsolete.html ( diff )
/popover.html ( diff )
/rendering.html ( diff )
/semantics-other.html ( diff )