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

bug(datepicker): Redundant announcement of header row cell values #23477

Closed
zarend opened this issue Aug 27, 2021 · 2 comments · Fixed by #24106
Closed

bug(datepicker): Redundant announcement of header row cell values #23477

zarend opened this issue Aug 27, 2021 · 2 comments · Fixed by #24106
Labels
Accessibility This issue is related to accessibility (a11y) area: material/datepicker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@zarend
Copy link
Contributor

zarend commented Aug 27, 2021

Reproduction

Steps to reproduce:

  1. Open the Datepicker Examples
  2. Go to the "basic datepicker" demo
  3. Activate "Open calendar" button
  4. Focus on the header row
  5. Linear navigate all the values of the header row

Expected Behavior

It should not announce the week name thrice

Actual Behavior

It is announcing the week name twice/thrice. For example, it is announcing as "Monday, Monday, Monday, group, column 2 of 7"

Environment

OS| Browser | Screen reader
ChromeOS | Google Chrome 91.0.4472.167 | ChromeVox
Windows 10 | Google Chrome 92.0.4515.131 | NVDA/JAWS
macOS Catalina | Google Chrome 92.0.4515.131 | VoiceOver
Windows 10 | Firefox 90.0.2 (64-bit) | NVDA

Additional Notes

This is copied from an internal bug report found during a11y testing.

@zarend zarend added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent Accessibility This issue is related to accessibility (a11y) area: material/datepicker labels Aug 27, 2021
@zarend
Copy link
Contributor Author

zarend commented Aug 27, 2021

from @jelbourn

This is likely due to a workaround employed to make ChromeVox and VoiceOver both happy. The HTML looks like this:

  <!-- For the day-of-the-week column header, we use an `<abbr>` element because VoiceOver
       ignores the `aria-label`. ChromeVox, however, does not read the full name
       for the `<abbr>`, so we still set `aria-label` on the header element. -->
  <th scope="col" *ngFor="let day of _weekdays" [attr.aria-label]="day.long">
    <abbr class="mat-calendar-abbr" [attr.title]="day.long">{{day.narrow}}</abbr>
  </th>

The duplicate announcement is probably coming from the combined aria-label on the th and the element inside.

One solution to try here would be something like

  <th scope="col" *ngFor="let day of _weekdays">
    <span class="cdk-visually-hidden">{{day.long}}</span>
    <span aria-hidden="true">{{day.narrow}}</span>
  </th>

zarend added a commit to zarend/components that referenced this issue Dec 15, 2021
Removes the `abbr` tag that is nested inside the cells of the day of the
week header. This is to fix angular#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 angular#23477
zarend added a commit to zarend/components that referenced this issue Dec 15, 2021
Removes the `abbr` tag that is nested inside the cells of the day of the
week header. This is to fix angular#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 angular#23477
zarend added a commit to zarend/components that referenced this issue Jan 19, 2022
Removes the `abbr` tag that is nested inside the cells of the day of the
week header. This is to fix angular#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 angular#23477
zarend added a commit to zarend/components that referenced this issue Jan 26, 2022
Removes the `abbr` tag that is nested inside the cells of the day of the
week header. This is to fix angular#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 angular#23477
zarend added a commit to zarend/components that referenced this issue Jan 26, 2022
Removes the `abbr` tag that is nested inside the cells of the day of the
week header. This is to fix angular#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 angular#23477
zarend added a commit that referenced this issue Feb 4, 2022
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

(cherry picked from commit 7a6549f)
zarend added a commit that referenced this issue Feb 4, 2022
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
amysorto pushed a commit to amysorto/components that referenced this issue Feb 15, 2022
…r#24106)

Removes the `abbr` tag that is nested inside the cells of the day of the
week header. This is to fix angular#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 angular#23477
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 7, 2022
forsti0506 pushed a commit to forsti0506/components that referenced this issue Apr 3, 2022
…r#24106)

Removes the `abbr` tag that is nested inside the cells of the day of the
week header. This is to fix angular#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 angular#23477
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accessibility This issue is related to accessibility (a11y) area: material/datepicker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant