Skip to content
This repository was archived by the owner on Feb 9, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/navigation/src/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,10 @@ export default class Navigation {
* @param {element} $submenu The submenu to open. Required.
*/
openSubmenu($submenu) {
const $anchor = $submenu.previousElementSibling;
// Open the submenu by updating ARIA and class.
$submenu.setAttribute('aria-hidden', false);
$anchor.setAttribute('aria-expanded', true);

/**
* Called when a submenu item is opened.
Expand All @@ -320,6 +322,7 @@ export default class Navigation {

// Close the submenu by updating ARIA and class.
$submenu.setAttribute('aria-hidden', true);
$anchor.setAttribute('aria-expanded', false);

if ($childSubmenus) {
// Close any children as well.
Expand Down