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): mat-datepicker-toggle does not announce expanded/collapsed state for screen readers #30406

Closed
1 task
RiinaKuu opened this issue Jan 28, 2025 · 1 comment · Fixed by #30438
Closed
1 task
Assignees
Labels
Accessibility This issue is related to accessibility (a11y) area: material/datepicker P2 The issue is important to a large percentage of users, with a workaround

Comments

@RiinaKuu
Copy link

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

mat-datepicker-toggle button uses aria-haspopup but does not inform screen reader users whether the popup is expanded or not.

Reproduction

Example link: https://material.angular.io/components/datepicker/examples

Steps to reproduce:

  • Go to the Angular Material link above (I used Chrome)
  • Start the screen reader (I used VoiceOver on MacOS)
  • Navigate to the datepicker calendar button
  • Realize that it is not informing you whether popup calendar is expanded or collapsed

Expected Behavior

The button should have aria-expanded attribute (which should always be paired if used aria-haspopup).

Actual Behavior

Image

Environment

  • Angular: 18.2.13
  • CDK/Material: 18.2.14
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS
@RiinaKuu RiinaKuu added the needs triage This issue needs to be triaged by the team label Jan 28, 2025
@wagnermaciel wagnermaciel added P2 The issue is important to a large percentage of users, with a workaround Accessibility This issue is related to accessibility (a11y) area: material/datepicker and removed needs triage This issue needs to be triaged by the team labels Jan 29, 2025
crisbeto added a commit to crisbeto/material2 that referenced this issue Feb 3, 2025
Fixes that the datepicker toggle's button wasn't setting `aria-expanded` properly.

Fixes angular#30406.
@crisbeto crisbeto self-assigned this Feb 3, 2025
crisbeto added a commit that referenced this issue Feb 3, 2025
)

Fixes that the datepicker toggle's button wasn't setting `aria-expanded` properly.

Fixes #30406.
crisbeto added a commit that referenced this issue Feb 3, 2025
)

Fixes that the datepicker toggle's button wasn't setting `aria-expanded` properly.

Fixes #30406.

(cherry picked from commit f15a939)
@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 6, 2025
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 P2 The issue is important to a large percentage of users, with a workaround
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants