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(mat-select): aria-owns and modal accessibility issue. #28230

Open
1 task
lylebuchanan opened this issue Dec 4, 2023 · 1 comment
Open
1 task

bug(mat-select): aria-owns and modal accessibility issue. #28230

lylebuchanan opened this issue Dec 4, 2023 · 1 comment
Labels
Accessibility This issue is related to accessibility (a11y) area: material/dialog area: material/select P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@lylebuchanan
Copy link

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

When using a mat-select inside of a dialog the select applies the aria-owns attribute to the aria-modal="true" element when the select panel is opened. After a selection is made, a critical accessibility issue in axeDevTools v 4.8.2 with error "Ensures all ARIA attributes have valid values" appears. This is due to the previously applied aria-owns id no longer existing on the dom after a selection is made. The aria-owns attribute is only removed from the modal on destroy of the select.

Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-mxpfyf?file=src%2Fapp%2Fexample-component.html
Steps to reproduce:

  1. Open the modal.
  2. Select an option
  3. Scan with axeDevTools or inspect dom to see aria-owns still exists on mat-dialog-container

Expected Behavior

The aria-owns label is removed from mat-dialog-container when the select panel is closed.

Actual Behavior

The aria-owns label is only removed on destroy of the select.

Environment

  • Angular: 16.2
  • CDK/Material: 16.2
  • Browser(s): chrome/edge
  • Operating System (e.g. Windows, macOS, Ubuntu): windows
@lylebuchanan lylebuchanan added the needs triage This issue needs to be triaged by the team label Dec 4, 2023
@emancol
Copy link

emancol commented Dec 5, 2023

If nobody is working on it, Can I fix it? Thanks!

@wagnermaciel wagnermaciel added Accessibility This issue is related to accessibility (a11y) area: material/select area: material/dialog P2 The issue is important to a large percentage of users, with a workaround P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed needs triage This issue needs to be triaged by the team P2 The issue is important to a large percentage of users, with a workaround labels Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility This issue is related to accessibility (a11y) area: material/dialog area: material/select P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
3 participants