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 #4482: Update Month Picker and Year Picker to select dates also on press of "SPACE" key #13

Merged

Conversation

balajis-qb
Copy link
Collaborator

Closes Hacker0x01#4482

Description

This PR addresses the date selection behavior in the calendar component to enhance accessibility based on W3C WAI-ARIA principles. Previously, the "Enter" key alone is used to select a Month picker and a Year Picker. But As per W3C WAI-ARIA principle both the "Enter" & "Space" keys should be able to select a date. Currently, only the date selector is selecting a date on both the "Enter" and the "Space" key. Hence I updated the Year Picker and the Month Picker to work like the date picker to select a date both by "Space" and "Enter" keys click.

Reference Link

Changes Made

  • Updated Year picker and Month picker to select values also on a click of the "Space" key in a similar way we handled on the date picker
  • Updated the corresponding test cases.

Adjust Month picker and Year picker to align with W3C WAI-ARIA principles.  Previously, the date gets selected only on "Enter" key press.  After this change, [both "Enter" and "Space" can select a date from both Month picker and Year picker](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/examples/datepicker-dialog/)
@balajis-qb balajis-qb changed the title Fix #4482: Update Month Picker and Year Picker to also select dates by "SPACE" key Fix #4482: Update Month Picker and Year Picker to select dates also by "SPACE" key Feb 12, 2024
@balajis-qb balajis-qb changed the title Fix #4482: Update Month Picker and Year Picker to select dates also by "SPACE" key Fix #4482: Update Month Picker and Year Picker to select dates also on press of "SPACE" key Feb 12, 2024
@balajis-qb balajis-qb merged commit 833bb68 into main Feb 26, 2024
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.

Month in Month Picker and Year in Year Picker cannot be selected by pressing the "Space" on keyboard.
1 participant