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(material/checkbox): MatCheckbox is missing support for aria-expanded attribute #28761

Closed
sheogora opened this issue Mar 21, 2024 · 1 comment · Fixed by #29457
Closed
Labels
Accessibility This issue is related to accessibility (a11y) area: material/checkbox P2 The issue is important to a large percentage of users, with a workaround

Comments

@sheogora
Copy link

Feature Description

Based on documentation for aria-expanded one of the roles with which this attribute is associated with is role=checkbox. There is currently no way of providing this aria-expanded attribute to the input element generated by MatCheckbox component.

Additionally based on the documentation provided aria-controls and aria-owns are also missing to indicate to the user which section the output of this input will affect.

Also see further discussion on extending support to role=radio

Use Case

Checkbox toggle status expands a related section with further options/information. Screen reader should be able to inform the user of any sections expanded/collapsed as a result of their action

Before
image

After
image

@sheogora sheogora 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 Mar 21, 2024
@wagnermaciel wagnermaciel added P2 The issue is important to a large percentage of users, with a workaround Accessibility This issue is related to accessibility (a11y) area: material/checkbox and removed 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 Mar 22, 2024
jullierme added a commit to jullierme/components that referenced this issue Jul 18, 2024
Added three new aria properties to MatCheckbox:
`aria-expanded`: Indicates whether the checkbox controls the visibility
of another element. This should be a boolean value (true or false).
`aria-controls`: Specifies the ID of the element that the checkbox controls.
`aria-owns`: Specifies the ID of the element that the checkbox visually owns.
These attributes will be added to the generated checkbox element if they
are specified and won't be present in the HTML if not provided.
Also added a small paragraph at the end of the checkbox.md file.

Fixes angular#28761
jullierme added a commit to jullierme/components that referenced this issue Sep 9, 2024
Added three new aria properties to MatCheckbox:
`aria-expanded`: Indicates whether the checkbox controls the visibility
of another element. This should be a boolean value (true or false).
`aria-controls`: Specifies the ID of the element that the checkbox controls.
`aria-owns`: Specifies the ID of the element that the checkbox visually owns.
These attributes will be added to the generated checkbox element if they
are specified and won't be present in the HTML if not provided.
Also added a small paragraph at the end of the checkbox.md file.

Fixes angular#28761
jullierme added a commit to jullierme/components that referenced this issue Sep 9, 2024
Added three new aria properties to MatCheckbox:
`aria-expanded`: Indicates whether the checkbox controls the visibility
of another element. This should be a boolean value (true or false).
`aria-controls`: Specifies the ID of the element that the checkbox controls.
`aria-owns`: Specifies the ID of the element that the checkbox visually owns.
These attributes will be added to the generated checkbox element if they
are specified and won't be present in the HTML if not provided.
Also added a small paragraph at the end of the checkbox.md file.

Fixes angular#28761
jullierme added a commit to jullierme/components that referenced this issue Sep 9, 2024
Added three new aria properties to MatCheckbox:
`aria-expanded`: Indicates whether the checkbox controls the visibility
of another element. This should be a boolean value (true or false).
`aria-controls`: Specifies the ID of the element that the checkbox controls.
`aria-owns`: Specifies the ID of the element that the checkbox visually owns.
These attributes will be added to the generated checkbox element if they
are specified and won't be present in the HTML if not provided.
Also added a small paragraph at the end of the checkbox.md file.

Fixes angular#28761
jullierme added a commit to jullierme/components that referenced this issue Sep 9, 2024
Added three new aria properties to MatCheckbox:
`aria-expanded`: Indicates whether the checkbox controls the visibility
of another element. This should be a boolean value (true or false).
`aria-controls`: Specifies the ID of the element that the checkbox controls.
`aria-owns`: Specifies the ID of the element that the checkbox visually owns.
These attributes will be added to the generated checkbox element if they
are specified and won't be present in the HTML if not provided.
Also added a small paragraph at the end of the checkbox.md file.

Fixes angular#28761
jullierme added a commit to jullierme/components that referenced this issue Sep 10, 2024
Added three new aria properties to MatCheckbox:
`aria-expanded`: Indicates whether the checkbox controls the visibility
of another element. This should be a boolean value (true or false).
`aria-controls`: Specifies the ID of the element that the checkbox controls.
`aria-owns`: Specifies the ID of the element that the checkbox visually owns.
These attributes will be added to the generated checkbox element if they
are specified and won't be present in the HTML if not provided.
Also added a small paragraph at the end of the checkbox.md file.

Fixes angular#28761
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accessibility This issue is related to accessibility (a11y) area: material/checkbox P2 The issue is important to a large percentage of users, with a workaround
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants