Skip to content

bug(datepicker): <table> element inside of the datepicker should read out column labels for elements #21357

@toastking

Description

@toastking

Reproduction

Use StackBlitz to reproduce your issue:

Steps to reproduce:

  1. Turn on screen reader
  2. Use keyboard navigation to select a day in a month on the date picker

Expected Behavior

What behavior were you expecting to see?

The screen reader should read out the column header (which is the day of the week) in addition to the label for the element.

Actual Behavior

What behavior did you actually see?

The screen reader reads out the date, but not the day of the week.

This is due to the table roles I believe, the outer table has a role of "presentation" but the inner tbody element has a role of "grid". The data grid role expects to be a table, so it looks for items with the role of "columnheader".

Environment

  • Angular: 10.1.1
  • CDK/Material: 10.2.1
  • Browser(s): 87.0.4280.88 (Official Build) (x86_64)
  • Operating System (e.g. Windows, macOS, Ubuntu): Mac OS 10.15.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    AccessibilityThis issue is related to accessibility (a11y)GThis is is related to a Google internal issueP2The issue is important to a large percentage of users, with a workaroundarea: material/datepicker

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions