components icon indicating copy to clipboard operation
components copied to clipboard

bug(Datepicker): Accessibility screen reader identifies incorrect number of rows in calendar.

Open amaust82 opened this issue 2 years ago • 2 comments

Is this a regression?

  • [ ] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

When using a keyboard while running a screen reader such as NVDA, upon opening the calendar the screen reader reports seven rows, even if there is only 6 visually.

Reproduction

Steps to reproduce:

  1. launch a screen reader such as JAWS or NVDA
  2. go to https://material.angular.io/components/datepicker/overview
  3. tab to the "Basic datepicker" field's calendar icon and hit ENTER to launch it
  4. Navigate to Feb 2024
  5. The screen reader narrates "table with 7 rows and 7 columns row 1 column 1 Sunday" yet visually 6 rows are provided in the calendar table.

Expected Behavior

The screen reader should narrate the correct number of rows, 6 (Header + calendar days)

Actual Behavior

The screen reader narrates 7 rows, even though there are 6

Environment

  • Angular: 16
  • CDK/Material: 16
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 11

amaust82 avatar Jan 25 '24 14:01 amaust82

Forgot to mention, in the code it looks like the divider row has aria-hidden on the table cell with a colspan of 7, but I'm wondering if that should be moved up to the

tag above it.

amaust82 avatar Jan 25 '24 14:01 amaust82

@essjay05 : this would be a good one for you to look at when you are available to. The fix may be as simple as putting aria-hidden="true" on the divider row 🤞

zarend avatar Feb 26 '24 19:02 zarend

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.