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

Fix #4521: ♻️ Update ariaLabel format in month.jsx to display the selected month and year in "Month MMMM, yyyy" #4565

Merged

Conversation

balajis-qb
Copy link
Contributor

Closes #4521

Description
This PR enhances the month.jsx component to display the selected month and year in the format Month December, 2024 instead of the previous format month 2024-12. This change improves the clarity and readability of the selected date for screen reader users.

Changes Made:

  • Adjested the aria-label for accessibility to reflect the new date format
  • Change the default ariaLabelPrefix from month to Month
  • Remove the unnecessary spaces after the ariaLabelPrefix while using it in aria-label

Testing:

  • Updated the existing test cases to check for the new aria-label format
  • Added two new test cases to test how the component is handling the custom ariaLabelPrefix and null ariaLabelPrefix values

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ This pull request was sent to the PullRequest network.


@balajis-qb you can click here to see the review status or cancel the code review job.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PullRequest Breakdown

Reviewable lines of change

+ 49
- 5

83% JavaScript (tests)
17% JavaScript

Type of change

Fix - These changes are likely to be fixing a bug or issue.

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.77%. Comparing base (8c10cb0) to head (f2d61db).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4565   +/-   ##
=======================================
  Coverage   95.77%   95.77%           
=======================================
  Files          29       29           
  Lines        2579     2582    +3     
  Branches     1069     1072    +3     
=======================================
+ Hits         2470     2473    +3     
  Misses        109      109           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@martijnrusschen
Copy link
Member

@balajis-qb Can you review the coverage report and see if we can get full coverage on this PR?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
… and year in "Month MMMM, yyyy"

Closes Hacker0x01#4521
@balajis-qb balajis-qb force-pushed the issue-4521/fix/aria-label-for-month branch from 233944c to f2d61db Compare March 6, 2024 11:57
@martijnrusschen
Copy link
Member

nice

@martijnrusschen martijnrusschen merged commit 127bc21 into Hacker0x01:main Mar 6, 2024
6 checks passed
@balajis-qb
Copy link
Contributor Author

Thank you

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.

Unclear aria-label for Month List Box in DatePicker Component
2 participants