Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/material/radio/radio.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@
<div class="mdc-radio" [class.mdc-radio--disabled]="disabled">
<!-- Render this element first so the input is on top. -->
<div class="mat-mdc-radio-touch-target" (click)="_onTouchTargetClick($event)"></div>
<!--
Note that we set `aria-invalid="false"` on the input, because otherwise some screen readers
will read out "required, invalid data" for each radio button that hasn't been checked.
An alternate approach is to use `aria-required` instead of `required`, however we have an
internal check which enforces that elements marked as `aria-required` also have the `required`
attribute which ends up re-introducing the issue for us.
-->
<input #input class="mdc-radio__native-control" type="radio"
[id]="inputId"
[checked]="checked"
[disabled]="disabled && !disabledInteractive"
[attr.name]="name"
[attr.value]="value"
[required]="required"
aria-invalid="false"
[attr.aria-label]="ariaLabel"
[attr.aria-labelledby]="ariaLabelledby"
[attr.aria-describedby]="ariaDescribedby"
Expand Down
Loading