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

feat(mat-option): Add aria-selected="false" back when used with single-selection #26642

Open
clamli opened this issue Feb 17, 2023 · 0 comments
Labels
Accessibility This issue is related to accessibility (a11y) area: material/autocomplete area: material/core area: material/select feature This issue represents a new feature or feature request rather than a bug or bug fix P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@clamli
Copy link
Contributor

clamli commented Feb 17, 2023

Feature Description

When mat-option is used with single-selection, the unselected option does not have aira-selected="false" set. This violates WCAG Success Criteria: 4.1.2 Name, Role, Value (A) as the aria-selected attribute is a required attribute for elements with role="option".

Expected behavior

  • When mat-option is not selected, set aria-selected="false"
  • When mat-option is selected, set aria-selected="true"

Use Case

No response

@clamli clamli added feature This issue represents a new feature or feature request rather than a bug or bug fix needs triage This issue needs to be triaged by the team labels Feb 17, 2023
@zarend zarend self-assigned this Feb 18, 2023
@zarend zarend added area: material/autocomplete area: material/core area: material/select Accessibility This issue is related to accessibility (a11y) and removed needs triage This issue needs to be triaged by the team labels Feb 18, 2023
hamzajazyri added a commit to hamzajazyri/components that referenced this issue Feb 20, 2023
…n its value is set to false

Add ARIA attribute 'aria-selected' to option when its value is set to false
fixes: angular#26642

BREAKING CHANGE: no
@andrewseguin andrewseguin added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Jun 1, 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/autocomplete area: material/core area: material/select feature This issue represents a new feature or feature request rather than a bug or bug fix P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
3 participants