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

(cherry picked from commit a8ec63c)
  • Loading branch information
zarend authored and andrewseguin committed Mar 1, 2022
1 parent 6977597 commit 046022f
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 046022f

Please sign in to comment.