Repository navigation
[Layout] ARIA attributes for navigation and drawer components - #5660
Merged
Merged
Conversation
…h empty IconTitle
…sts for accessibility
Denis Voituron (dvoituron)
requested a review
from Vincent Baaij (vnbaaij)
as a code owner
November 23, 2026 14:54
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Blank IDs cause a new navigation ID on each render, potentially leaving the hamburger’s aria-controls pointing to a nonexistent element; the fallback ID needs to be cached and reused.
1 open issue
What changed in this PR
This PR addresses #5644 by moving hamburger ARIA state onto the interactive button and synchronizing it with mobile drawers and desktop navigation.
Changes:
- Adds initial ARIA attributes and a localized accessible-name fallback.
- Updates state synchronization across drawer events, breakpoint changes, and enhanced navigation.
- Adds navigation ID generation and expands render tests and snapshots.
| File | Description |
|---|---|
tests/Tools/Verify/FluentAssertOptions.cs |
Scrubs generated aria-controls values in snapshots. |
tests/Core/Components/Layout/FluentLayoutTests.razor |
Tests accessible names, initial ARIA attributes, and navigation IDs. |
tests/Core/Components/Layout/FluentLayoutTests.FluentLayout_Hamburger_OutsideLayout.verified.razor.html |
Records standalone hamburger ARIA attributes. |
tests/Core/Components/Layout/FluentLayoutTests.FluentLayout_Hamburger_Default.verified.razor.html |
Records default hamburger ARIA attributes. |
src/Core/Components/Layout/FluentLayoutItem.razor.cs |
Generates navigation IDs when none are supplied. |
src/Core/Components/Layout/FluentLayoutHamburger.razor |
Places ARIA attributes and an accessible name on the button. |
src/Core.Scripts/src/Components/Layout/FluentLayout.ts |
Synchronizes button state and targets with navigation and drawer interactions. |
Review effort: Balanced
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 98.9%
Microsoft.FluentUI.AspNetCore.Components.Charts - 100%
|
…d preserves explicit blank IDs
8 of 13 tasks
Vincent Baaij (vnbaaij)
approved these changes
Nov 23, 2026
Denis Voituron (dvoituron)
deleted the
users/dvoituron/fix-layout-aria
branch
November 23, 2026 15:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

[Layout] ARIA attributes for navigation and drawer components
Improve accessibility by enhancing ARIA attributes for navigation buttons and drawer interactions.
This change addresses accessibility concerns and ensures compliance with best practices.
Fix #5644
Mix of PR #5653 and #5659
Feature / resolved scenario
Limitations: deferred navigation loading requires an interactive render mode; a standalone hamburger outside any layout is not automatically initialized in static SSR.