You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of us over in Open UI have been designing the new menu elements proposal (explainer), which is a suite of new HTML elements designed to fulfill the menu and menubar roles / pattern. Please see the APG pattern for more details, which served as some initial motivation and inspiration for our proposal.
Our goal is to produce a set of menu primitives with sensible built-in keyboard navigability, accessibility, and activation defaults, as we've observed this pattern widely across the web, with each instance varying slightly in all forms of behavior, and many of which have very poor accessibility characteristics. Our proposal builds off of recent primitives such as popovers and anchor positioning, and all of the design details to date have been collected in the explainer: https://open-ui.org/components/menu.explainer/. Please take a look!
Our goal is eventual inclusion in HTML, so we'd love to propose stage 1, and discuss this at the WHATNOT meeting scheduled for 2025-10-09.
Drive-by comment: I noticed that tests are using :popover-open for <menulist>. I think it would be bad for that pseudo-element to match in this case (same as with ::picker(select). The pseudo-class for HTML elements is :open. We shouldn't leak the implementation like that.
Drive-by comment: I noticed that tests are using :popover-open for <menulist>. I think it would be bad for that pseudo-element to match in this case (same as with ::picker(select). The pseudo-class for HTML elements is :open. We shouldn't leak the implementation like that.
I don't think it's "leaking" the implementation, if the specification explicitly says it's a popover, right? The plan is similar for the menulist element. If the elements are explicitly popovers, it seems odd/confusing for them to only behave partly like a popover, with some popover features magically disabled.
I don't think it's actually defined at the moment? It says "select popover" but other than it being a div element it's not explained what that means. I would certainly object to it being defined in a way that would make it match :popover-open. But that's w3c/csswg-drafts#10775.
The other algorithms (e.g. pick an option) treat it as a popover, e.g. by running the show popover and hide popover algorithms on it. It sets up an implicit anchor relationship like popovers. Most importantly though, the behavior is observable - if you open the select picker, it participates in the normal popover stacking process, e.g. closing other popover=auto popovers on the page. Again, because it is a popover.
I'm kind of unclear what the downside of acknowledging it as a popover would be? The upside, for developers, is that they know what it means, how it behaves, and how to use it.
I don’t think we should have multiple APIs for the same thing. An open picker is select:open. I also think that participating in numerous popover things should be a case-by-case decision based on what makes sense for the element involved. For instance, we do events separately as well and I don’t think we should allow a button to target a menulist as a popover. That’s just rather strange API for a built-in element.
Why is the PR's OP not up-to-date? It also doesn't seem like the PR defines the orientation attribute?
I'm also rather surprised this contains a whole section on the controversial interest invokers feature (including re-introducing the "invoker" word which we've largely managed to get rid of in the specification).
Why is the PR's OP not up-to-date? It also doesn't seem like the PR defines the orientation attribute?
Oops. I think I've updated it now, although it's possible that a little more detail might be desirable. (Sorry for missing this -- I was making an effort to keep the explainer, spec PR, and Chromium implementation in sync with each other, and managed to forget about keeping the PR's OP up-to-date too!)
I've also clarified the OP that the point it was making about orientation is that it's not included in the current PR, though I added a little explanation as to why that's still the case, and that we now intend not to include it as part of the initial version of menus.
I'm also rather surprised this contains a whole section on the controversial interest invokers feature (including re-introducing the "invoker" word which we've largely managed to get rid of in the specification).
My understanding of the core controversy around interest invokers is that it centers on the risks of authors creating content that can only be opened or activated via interest and not by a broader set of mechanisms that (combined) meet accessibility requirements better. The menu elements proposed here use the mechanisms of the interest invokers proposal for opening submenus in response to hover (in a way that roughly matches the way menus work across major desktop operating systems), but they do so in a way that avoids this core controversy because submenus also open on click/tap or on keyboard activation. (In other words, my understanding of the core of the controversy is that it's specific to the risks of exposing the mechanism to authors and does not apply to using it internally in other specification features, as long as those specification features themselves follow the correct practices.)
I think it's valuable to use the internals of the specification proposal for interest invokers for a few reasons:
if we do find a way forward to make progress on the developer-exposed interest invokers API surface, we probably want menus to interact well with it, and building on top of it should do that
even if we don't, it's possible (although this point is definitely less concrete than the other two) we might add other features to HTML that also want to build on it in the same way, and those should interact well with menus
the internals of the interest invokers spec proposal are based on quite a bit of prototyping and testing, and I think if we tried to write a new (simpler?) proposal for just the parts that we think menus need, we might end up finding and re-fixing many of the same bugs that have already been fixed as part of the prototyping cycles that have gone in to the interest invokers work, and we may well end up back at a similar level of complexity.
That said, I'm totally open to changing the names. I wasn't aware that "invoker" was a word we wanted to avoid and I'm happy to rename things as needed.
Activity
emilio commentedon Oct 9, 2025
FWIW some of the relevant XUL menubar code:
Since it was mentioned that you were looking into the activation stuff that's here.
saschanaz commentedon Oct 9, 2025
FWIW the Gecko-only past iteration on menu elements that is removed: https://bugzilla.mozilla.org/show_bug.cgi?id=1372276
annevk commentedon Mar 15, 2026
Drive-by comment: I noticed that tests are using
:popover-openfor<menulist>. I think it would be bad for that pseudo-element to match in this case (same as with::picker(select). The pseudo-class for HTML elements is:open. We shouldn't leak the implementation like that.mfreed7 commentedon Mar 16, 2026
I don't think it's "leaking" the implementation, if the specification explicitly says it's a popover, right? The plan is similar for the menulist element. If the elements are explicitly popovers, it seems odd/confusing for them to only behave partly like a popover, with some popover features magically disabled.
annevk commentedon Mar 16, 2026
I don't think it's actually defined at the moment? It says "select popover" but other than it being a
divelement it's not explained what that means. I would certainly object to it being defined in a way that would make it match:popover-open. But that's w3c/csswg-drafts#10775.mfreed7 commentedon Mar 16, 2026
The other algorithms (e.g. pick an option) treat it as a popover, e.g. by running the show popover and hide popover algorithms on it. It sets up an implicit anchor relationship like popovers. Most importantly though, the behavior is observable - if you open the select picker, it participates in the normal popover stacking process, e.g. closing other
popover=autopopovers on the page. Again, because it is a popover.I'm kind of unclear what the downside of acknowledging it as a popover would be? The upside, for developers, is that they know what it means, how it behaves, and how to use it.
annevk commentedon Mar 16, 2026
I don’t think we should have multiple APIs for the same thing. An open picker is
select:open. I also think that participating in numerous popover things should be a case-by-case decision based on what makes sense for the element involved. For instance, we do events separately as well and I don’t think we should allow a button to target amenulistas a popover. That’s just rather strange API for a built-in element.39 remaining items
jstenback commentedon Oct 8, 2026
Moved to stage3 per the discussion in today's WHATNOT meeting.
annevk commentedon Nov 3, 2026
Why is the PR's OP not up-to-date? It also doesn't seem like the PR defines the
orientationattribute?I'm also rather surprised this contains a whole section on the controversial interest invokers feature (including re-introducing the "invoker" word which we've largely managed to get rid of in the specification).
dbaron commentedon Nov 3, 2026
Oops. I think I've updated it now, although it's possible that a little more detail might be desirable. (Sorry for missing this -- I was making an effort to keep the explainer, spec PR, and Chromium implementation in sync with each other, and managed to forget about keeping the PR's OP up-to-date too!)
I've also clarified the OP that the point it was making about
orientationis that it's not included in the current PR, though I added a little explanation as to why that's still the case, and that we now intend not to include it as part of the initial version of menus.My understanding of the core controversy around interest invokers is that it centers on the risks of authors creating content that can only be opened or activated via interest and not by a broader set of mechanisms that (combined) meet accessibility requirements better. The menu elements proposed here use the mechanisms of the interest invokers proposal for opening submenus in response to hover (in a way that roughly matches the way menus work across major desktop operating systems), but they do so in a way that avoids this core controversy because submenus also open on click/tap or on keyboard activation. (In other words, my understanding of the core of the controversy is that it's specific to the risks of exposing the mechanism to authors and does not apply to using it internally in other specification features, as long as those specification features themselves follow the correct practices.)
I think it's valuable to use the internals of the specification proposal for interest invokers for a few reasons:
That said, I'm totally open to changing the names. I wasn't aware that "invoker" was a word we wanted to avoid and I'm happy to rename things as needed.