openui / openui/open-ui

[menu] Consider reusing `<menu>` and `<nav>` HTML elements

Open
#1,194 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

menu needs-triage
Dominant language
MDX
Stars
4.5k
Forks
226
Avg merge
2d 22h
Merged PRs (30d)
4

Description

Instead of introducing a brand new elements like <menubar> element, we could consider reusing <menu> for the regular, non-navigation menubar example referenced by ARIA's authoring practices: https://www.w3.org/WAI/ARIA/apg/patterns/menubar/examples/menubar-editor/. This would need to be done with some sort of opt-in (much like appearance: base-select does for the existing <select> element, to make it customizable), which could either be in CSS or an HTML attribute. We could also maybe consider reusing <nav> for the navigation bar use case, but this is related to https://github.com/openui/open-ui/issues/1193.

It seems nice to reuse these elements if possible, just because they have nice short names and we'd be adding less new clutter to the platform, but I think there are tradeoffs, and discussing this with WHATWG folks will be important as time passes.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked ARIA menubar example and related issue #1193; compare whether

or can cover each use case and review the proposed CSS or HTML opt-in tradeoffs. Done means reaching a clear recommendation about reuse and identifying what discussion with WHATWG would be needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.