Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(menu)[matMenuTriggerFor]: Trigger does not update ARIA values correctly in OnPush components (Accessibility) #29041

Open
1 task done
kryoussef opened this issue May 13, 2024 · 3 comments
Labels
needs: clarification The issue does not contain enough information for the team to determine if it is a real bug

Comments

@kryoussef
Copy link

kryoussef commented May 13, 2024

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

It seems like the issue : 26262 has not been resolved,
The Trigger does not update aria values and misbehaves in OnPush components.

Reproduction

StackBlitz link: https://stackblitz.com/edit/angular-bqrgp1-p8dplp?file=src%2Fapp%2Fmenu-overview-example.ts
Steps to reproduce:

  1. use NVDA Speech viewer
  2. open the menu and select items (multiple times)
    screen reader

Expected Behavior

When selecting an item menu-item from the menu, the aria-label and aria-expanded should be updated correctly,
From the example above, NVDA should read item2 with menu being collapsed

Actual Behavior

As shown in the screenshot, when we click on the item2, NVDA is reading item1 with the menu being expanded

Environment

  • Angular: 17.3.7
  • CDK/Material: 17.3.7
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows
@kryoussef kryoussef added the needs triage This issue needs to be triaged by the team label May 13, 2024
@crisbeto
Copy link
Member

I'm a bit confused about the setup here. It's using MatMenu even though the issue is talking about the CDK menu. Also the bindings you're mentioning are set up by your own component, not to Material/CDK ones so you'll have to call markForCheck there yourself.

@crisbeto crisbeto added needs: clarification The issue does not contain enough information for the team to determine if it is a real bug and removed needs triage This issue needs to be triaged by the team labels May 14, 2024
@kryoussef
Copy link
Author

HEllo @crisbeto ,
The issue is : 26262 and the fixe is 26279
I will have to update the issue description

@kryoussef kryoussef changed the title bug(cdk/menu): Trigger does not update ARIA values correctly in OnPush components (Accessibility) bug(menu)[matMenuTriggerFor]: Trigger does not update ARIA values correctly in OnPush components (Accessibility) May 14, 2024
@crisbeto
Copy link
Member

I spent some time trying to reproduce it, but the aria-expanded was being updated as expected in the Stackblitz. Could there be something in your app that's interfering with it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: clarification The issue does not contain enough information for the team to determine if it is a real bug
Projects
None yet
Development

No branches or pull requests

2 participants