Skip to content

Commit 7fd0b94

Browse files
committed
fix(material/datepicker): remove abbr from day of week header
Removes the `abbr` tag that is nested inside the cells of the day of the week header. This is to fix #23477 where VoiceOver reads day of week three times: 'Sunday, Sunday, Sunday...' I tested this change on VoiceOverAfter this change and sometimes it read the day of week twice and sometimes it read it once. When navigating from a day on the calendar to the header it reads: "row 1 of 7 Sunday S". When navigating from Sunday to Monday, it reads "Monday Monday M Column 2 of 7". Tested on macos 12.0.1 (21A559) with chrome Version 96.0.4664.110 (Official Build) (x86_64). I'll leave this as a draft until I can at least test it on other screenreaders. fixes #23477
1 parent 7468588 commit 7fd0b94

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/material/datepicker/month-view.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<table class="mat-calendar-table" role="grid">
22
<thead class="mat-calendar-table-header">
33
<tr>
4-
<!-- For the day-of-the-week column header, we use an `<abbr>` element because VoiceOver
5-
ignores the `aria-label`. ChromeVox, however, does not read the full name
6-
for the `<abbr>`, so we still set `aria-label` on the header element. -->
7-
<th scope="col" *ngFor="let day of _weekdays" [attr.aria-label]="day.long">
8-
<abbr class="mat-calendar-abbr" [attr.title]="day.long">{{day.narrow}}</abbr>
4+
<!-- TODO(zarend): setup prettier in vim -->
5+
<th scope="col" *ngFor="let day of _weekdays" [attr.aria-label]="day.long" class="mat-calendar-abbr">
6+
{{day.narrow}}
97
</th>
108
</tr>
119
<tr><th aria-hidden="true" class="mat-calendar-table-header-divider" colspan="7"></th></tr>

0 commit comments

Comments
 (0)