Steps to Reproduce
Write a menubar nav with at least one group:
{% nav layout="menubar" %}
## Docs
- getting-started
- installation
{% /nav %}
Load the page with behaviours enabled, and inspect the group heading.
Tab to the heading and press ArrowDown, then Escape.
Expected
The behaviour wires each group as a WAI-ARIA menubar item, as its own doc comment describes:
- the heading gets
role="button", tabindex="0", aria-haspopup and aria-expanded, with an id the panel references; - a click toggles the group's
data-open, and only one group is open at a time; - ArrowLeft and ArrowRight move between triggers, ArrowDown enters the open submenu, and Escape closes it and returns focus.
Actual
None of that happens: no group is wired. The panels still open on hover and on :focus-within, through the skeleton's fallback rules (packages/skeleton/styles/runes/nav.css:80–82), so mouse users see working dropdowns and the defect is easy to miss. Keyboard and screen-reader users get no menubar semantics: no roles, no expanded state, no arrow-key navigation, and no Escape.
Environment
main as of 2026-11-09.- There is no behaviour test for the menubar. Nav tests in
packages/runes/test cover the schema and auto-enrichment, not navMenubarBehavior.
Approach
- Select the panel as
:scope > [data-name="panel"], the element SPEC-054 introduced and the CSS already styles. That is also the selector SPEC-196 D6 asks for, since it uses the vocabulary rather than an element name. - Check the other
:scope > … lookups in the same file against the current output, notably the mobile trigger (:scope > [data-name="trigger"]). - Add a DOM test (jsdom, as the other behaviour tests use) that renders a menubar nav through the real schema and asserts the roles and the keyboard model, so the schema and the behaviour cannot drift apart again.
References
- SPEC-196 D6: the behaviour audit that found it.
- SPEC-054: the panel wrapper.