Skip to content

Conversation

@atarek12
Copy link

@atarek12 atarek12 commented Nov 2, 2025

Description

Linked issue: #(issue number)

Problem
There is an issue with weekday name when using datepicker component without using datepicker styles
i.e: import "react-datepicker/dist/react-datepicker.css";

Changes
The issue has been introduced in this pr that fixes this issue.
But instead of using sr-only class on an extra span element which will be rendered if we don't import the stylesheet.
I have reverted it back to use aria-label but kept the inner span with aria-hidden="true"; so the screen-readers will skip it and announce the aria-label prop.

Screenshots

  • Before: Notice the duplicate of weekday -> SundaySu
Screenshot 2025-11-02 at 9 48 09 PM
  • After
Screenshot 2025-11-02 at 9 48 56 PM

Contribution checklist

  • I have followed the contributing guidelines.
  • I have added sufficient test coverage for my changes.
  • I have formatted my code with Prettier and checked for linting issues with ESLint for code readability.

@martijnrusschen
Copy link
Member

Please check the output of the failing CI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants