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 #4623: Add dynamic Calendar Aria Labels for selection clarity #4624

Conversation

balajis-qb
Copy link

Closes #4623

Description

This PR updates the Calendar component to display dynamic aria-label based on the selection purpose (date/date and time/time only). After this change the aria-label will be

  • "Choose Date and Time" if either we pass showTimeInput or showTimeSelect.
  • "Choose Time" if we pass showTimeSelectOnly.
  • "Choose Date" in all the other cases.

Changes Made

  • Updated aria-label to reflect selection options like showTimeInput or showTimeSelect or showTimeSelectOnly.
  • Added test cases for validation.

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

+ 52
- 3

69% JavaScript (tests)
31% JavaScript

Type of change

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

Copy link

codecov bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.96%. Comparing base (f7048fa) to head (da29d6a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4624   +/-   ##
=======================================
  Coverage   96.96%   96.96%           
=======================================
  Files          28       28           
  Lines        2601     2607    +6     
  Branches     1095     1101    +6     
=======================================
+ Hits         2522     2528    +6     
  Misses         79       79           

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

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 is a straightforward improvement with corresponding test cases, I see no reason not to incorporate it.

Image of Will B Will B


Reviewed with ❤️ by PullRequest

@martijnrusschen martijnrusschen merged commit 44e7253 into Hacker0x01:main Mar 20, 2024
6 checks passed
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.

Calendar Aria Labels is not updating corresponding to it's purpose
2 participants