-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Improve calendar keyboard accessibility #15451
Improve calendar keyboard accessibility #15451
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
@@ -243,6 +243,7 @@ export const CALENDAR_VALUE_ACCESSOR: any = { | |||
[ngClass]="{ 'p-highlight': isSelected(date) && date.selectable, 'p-disabled': !date.selectable }" | |||
(click)="onDateSelect($event, date)" | |||
draggable="false" | |||
[attr.data-date]="formatDateKey(formatDateMetaToDate(date))" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why to add attr.data-date ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To find the necessary cell for focus, you can refer to an example of its usage in row 2218. Another solution to this problem, albeit not ideal, is to use an ID. However, this approach may not be as effective.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot we'll discuss whether to add new attribute or not and review the PR again upcoming week's release.
Fixes #14995
Updated the calendar component to include keyboard navigation. Users can now utilize keys such as Page Up, Page Down, Home, and End to navigate through the calendar as mentioned in the issue description. The update also involves refactoring date formatting into dedicated functions to improve code readability and maintainability.