Skip to content

Commit 51488a2

Browse files
committed
fix(material/datepicker): Move aria-live attribute so month can also be announced when using previous and next month buttons (#29137)
(cherry picked from commit b9fedfe)
1 parent 8d44ed9 commit 51488a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/material/datepicker/calendar-header.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<div class="mat-calendar-header">
22
<div class="mat-calendar-controls">
3-
<!-- [Firefox Issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1880533]
3+
<!-- [Firefox Issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1880533]
44
Relocated label next to related button and made visually hidden via cdk-visually-hidden
55
to enable label to appear in a11y tree for SR when using Firefox -->
6-
<label [id]="_periodButtonLabelId" class="cdk-visually-hidden">{{periodButtonDescription}}</label>
6+
<label [id]="_periodButtonLabelId" class="cdk-visually-hidden" aria-live="polite">{{periodButtonDescription}}</label>
77
<button mat-button type="button" class="mat-calendar-period-button"
88
(click)="currentPeriodClicked()" [attr.aria-label]="periodButtonLabel"
9-
[attr.aria-describedby]="_periodButtonLabelId" aria-live="polite">
9+
[attr.aria-describedby]="_periodButtonLabelId">
1010
<span aria-hidden="true">{{periodButtonText}}</span>
1111
<svg class="mat-calendar-arrow" [class.mat-calendar-invert]="calendar.currentView !== 'month'"
1212
viewBox="0 0 10 5" focusable="false" aria-hidden="true">

0 commit comments

Comments
 (0)