Skip to content

Commit

Permalink
fix(material/datepicker): Move aria-live attribute so month can also …
Browse files Browse the repository at this point in the history
…be announced when using previous and next month buttons (#29137)
  • Loading branch information
amysorto committed Jun 3, 2024
1 parent c9e1d4a commit b9fedfe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/material/datepicker/calendar-header.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div class="mat-calendar-header">
<div class="mat-calendar-controls">
<!-- [Firefox Issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1880533]
<!-- [Firefox Issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1880533]
Relocated label next to related button and made visually hidden via cdk-visually-hidden
to enable label to appear in a11y tree for SR when using Firefox -->
<label [id]="_periodButtonLabelId" class="cdk-visually-hidden">{{periodButtonDescription}}</label>
<label [id]="_periodButtonLabelId" class="cdk-visually-hidden" aria-live="polite">{{periodButtonDescription}}</label>
<button mat-button type="button" class="mat-calendar-period-button"
(click)="currentPeriodClicked()" [attr.aria-label]="periodButtonLabel"
[attr.aria-describedby]="_periodButtonLabelId" aria-live="polite">
[attr.aria-describedby]="_periodButtonLabelId">
<span aria-hidden="true">{{periodButtonText}}</span>
<svg class="mat-calendar-arrow" [class.mat-calendar-invert]="calendar.currentView !== 'month'"
viewBox="0 0 10 5" focusable="false" aria-hidden="true">
Expand Down

0 comments on commit b9fedfe

Please sign in to comment.