Skip to content

Commit

Permalink
fix(material/datepicker): use aria-live over cdkAriaLive on period bu…
Browse files Browse the repository at this point in the history
…tton

On the period button on the calendar, use `aria-live` over `cdkAriaLive`
because that seems to work better with VoiceOver. This fixes an issue
where VoiceOver did not announce the month after clicking the "Month
Month"/"Previous Month" buttons (angular#24397).

Fixes angular#24397
  • Loading branch information
zarend committed Feb 24, 2022
1 parent 8a12da7 commit 26b48a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/material/datepicker/calendar-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<button mat-button type="button" class="mat-calendar-period-button"
(click)="currentPeriodClicked()" [attr.aria-label]="periodButtonLabel"
[attr.aria-describedby]="_buttonDescriptionId"
cdkAriaLive="polite">
aria-live="polite">
<span [attr.id]="_buttonDescriptionId">{{periodButtonText}}</span>
<svg class="mat-calendar-arrow" [class.mat-calendar-invert]="calendar.currentView !== 'month'"
viewBox="0 0 10 5" focusable="false">
Expand Down

0 comments on commit 26b48a0

Please sign in to comment.