microsoft / microsoft/aspire

Resources context menu adds invalid aria-expanded to layout container

Open Beginner friendly
#18,982 3 comments 0 reactions 0 assignees View on GitHub
area-dashboard triage:bot-seen
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Description

After updating `Microsoft.FluentUI.AspNetCore.Components` to 4.14.4, `FluentMenu` unconditionally writes `aria-expanded` to its anchor.

The Resources context menu uses `resources-summary-layout-id` with `Anchored="false"`. That ID belongs to a plain layout `

`, so loading the Resources page adds `aria-expanded="false"` to an element with the implicit `generic` role and opening the context menu toggles it to `true`.

`aria-expanded` is not permitted on the implicit `generic` role, and this exposes a bogus expanded/collapsed state to assistive technology.

### Expected behavior

The semantic layout container should not be used as the positioning anchor for this unanchored context menu, or Fluent UI should only write `aria-expanded` for anchored trigger menus.

### Additional context

Follow-up from https://github.com/microsoft/aspire/pull/18972#discussion_r3708236971

Contributor guide

Open the contributing guide

Research direction

Search the Resources page for `resources-summary-layout-id` and inspect the `FluentMenu` usage with `Anchored="false"`. Load the Resources page and open the context menu to verify that the plain layout container no longer receives or toggles `aria-expanded`, while the menu still works correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, html
Domain
accessibility, frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.