Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(material/datepicker): datepicker doesn't announce newly selected range in firefox #28529

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/material/datepicker/calendar-header.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<div class="mat-calendar-header">
<div class="mat-calendar-controls">
<!-- [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>
<button mat-button type="button" class="mat-calendar-period-button"
(click)="currentPeriodClicked()" [attr.aria-label]="periodButtonLabel"
[attr.aria-describedby]="_periodButtonLabelId" aria-live="polite">
Expand All @@ -25,4 +29,3 @@
</button>
</div>
</div>
<label [id]="_periodButtonLabelId" class="mat-calendar-hidden-label">{{periodButtonDescription}}</label>
4 changes: 0 additions & 4 deletions src/material/datepicker/calendar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,3 @@ $_tokens: tokens-mat-datepicker.$prefix, tokens-mat-datepicker.get-token-slots()
content: '';
}

// Label that is not rendered and removed from the accessibility tree.
.mat-calendar-hidden-label {
display: none;
}
Loading