Skip to content

[menu] [openable] allow author choice of opening a submenu inline or as a popup #1198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
scottaohara opened this issue Apr 17, 2025 · 0 comments
Labels
menu Menu elements proposal openable The Openable API

Comments

@scottaohara
Copy link
Collaborator

We are likely all familiar with the use case for submenu popups being invoked on hover/focus or click of a menu's menuitem.

I've also seen use cases where authors have created "submenus" which are more like expand/collapse groups within a menu list.

I mention this because it could be another use case for the proposed openable attribute, and could allow for something like:

<menulist>
  ...
  <menuitem command=toggle commandfor=g>whatever</menuitem>
  <fieldset openable id=g>
    <menuitem>A</menuitem>
    <menuitem>B</menuitem>
    <menuitem>C</menuitem>
  </fieldset>
  ...
</menulist>

this could allow for an expand/collapse state on the menuitem with the command=toggle. it would not invoke it as a popover. ideally, this could allow for an automatic naming mechanism for the fieldset (allowing it to be exposed as a role=group with accName "whatever"). this automatic naming helping to make sure that the group start/end points were defined - and if someone wanted to give the fieldset a more specific name when the set was in the expanded state, they could use the legend element to do so. (or whatever the elements end up being for grouping/naming said group for menuitems)

cc @lukewarlow

@scottaohara scottaohara added menu Menu elements proposal openable The Openable API labels Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
menu Menu elements proposal openable The Openable API
Projects
None yet
Development

No branches or pull requests

1 participant