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 (#24398)

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 (#24397).

Fixes #24397
  • Loading branch information
zarend committed Mar 1, 2022
1 parent 64c2d31 commit a8ec63c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/material/datepicker/calendar-header.html
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 a8ec63c

Please sign in to comment.