Skip to content

Commit

Permalink
feat(material/checkbox): add new aria properties to MatCheckbox
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jullierme committed Sep 9, 2024
1 parent 6d97933 commit 8166cfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/material/checkbox/checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
[attr.aria-labelledby]="ariaLabelledby"
[attr.aria-describedby]="ariaDescribedby"
[attr.aria-checked]="indeterminate ? 'mixed' : null"
[attr.aria-controls]="ariaControls"
[attr.aria-disabled]="disabled && disabledInteractive ? true : null"
[attr.aria-expanded]="ariaExpanded"
[attr.aria-controls]="ariaControls"
[attr.aria-owns]="ariaOwns"
[attr.name]="name"
[attr.value]="value"
Expand Down

0 comments on commit 8166cfc

Please sign in to comment.