Skip to content

[navigation menu] Remove invalid aria-orientation - #4355

Merged
atomiks merged 1 commit into
mui:masterfrom
atomiks:codex/navigation-menu-remove-aria-orientation
Mar 17, 2026
Merged

atomiks merged 1 commit into
mui:masterfrom
atomiks:codex/navigation-menu-remove-aria-orientation

Conversation

@atomiks

@atomiks atomiks commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #4349

Summary

NavigationMenu.List currently renders aria-orientation on a plain ul, which triggers accessibility checks because that implicit role does not support the attribute. This change stops Navigation Menu from outputting aria-orientation on either top-level or nested lists.

Changes

  • Override the list props so NavigationMenu.List does not render aria-orientation.
  • Update the Navigation Menu root tests to assert the attribute is absent on both top-level and nested lists.

Notes

  • After rebasing onto upstream/master, pnpm test:jsdom NavigationMenuRoot --no-watch fails before running tests because Vite cannot resolve date-fns/addDays from packages/react/src/temporal-adapter-date-fns/TemporalAdapterDateFns.ts.
  • pnpm exec eslint packages/react/src/navigation-menu/list/NavigationMenuList.tsx packages/react/src/navigation-menu/root/NavigationMenuRoot.test.tsx passes.

@atomiks atomiks added type: bug It doesn't behave as expected. accessibility a11y component: navigation menu Changes related to the navigation menu component. labels Mar 16, 2026
@pkg-pr-new

pkg-pr-new Bot commented Mar 16, 2026 •

Copy link
Copy Markdown

commit: a9d0f21

@mui-bot

mui-bot commented Mar 16, 2026 •

Copy link
Copy Markdown

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react 🔺+8B(0.00%) 🔺+1B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@netlify

netlify Bot commented Mar 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit a9d0f21
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/69b905c92299cf00089bfafa
😎 Deploy Preview https://deploy-preview-4355--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@atomiks
atomiks force-pushed the codex/navigation-menu-remove-aria-orientation branch from 48dc75c to da08878 Compare March 17, 2026 07:29
@atomiks
atomiks force-pushed the codex/navigation-menu-remove-aria-orientation branch from da08878 to a9d0f21 Compare March 17, 2026 07:41
@atomiks

atomiks commented Mar 17, 2026

Copy link
Copy Markdown
Contributor Author

Codex Review

Overview

This patch removes an unsupported aria-orientation attribute from NavigationMenu.List and updates the regression tests to lock in the new behavior. The change is small and targeted, and it keeps the keyboard-handling behavior intact while fixing the accessibility issue.

Findings (None)

No blocking issues found in this patch.

Confidence: 4/5

High confidence based on a full review of the branch diff across the changed logic and regression tests. The patch is narrow, the override is necessary because the composite root still injects aria-orientation on the top-level path, and I did not find correctness, accessibility, API, maintainability, performance, or test-coverage problems in the updated code.

@atomiks
atomiks marked this pull request as ready for review March 17, 2026 07:46
@atomiks
atomiks merged commit 63be369 into mui:master Mar 17, 2026
23 checks passed
@atomiks
atomiks deleted the codex/navigation-menu-remove-aria-orientation branch March 17, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility a11y component: navigation menu Changes related to the navigation menu component. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[navigation menu] Invalid use of aria-orientation

2 participants