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

Improve calendar keyboard accessibility #15451

Conversation

PronDmytro
Copy link
Contributor

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.

Copy link

vercel bot commented May 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
primeng ⬜️ Ignored (Inspect) Visit Preview May 4, 2024 7:05pm

@PronDmytro PronDmytro changed the title improve calendar keyboard accessibility Improve calendar keyboard accessibility May 4, 2024
@@ -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))"
Copy link
Contributor

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 ?

Copy link
Contributor Author

@PronDmytro PronDmytro May 9, 2024

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.

Copy link
Contributor

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.

@cetincakiroglu cetincakiroglu added Resolution: Needs More Information More information about the issue is needed to find a correct solution Status: Pending Review Issue or pull request is being reviewed by Core Team Status: Discussion Issue or pull request needs to be discussed by Core Team and removed Resolution: Needs More Information More information about the issue is needed to find a correct solution labels May 9, 2024
@cetincakiroglu cetincakiroglu merged commit f1ced3c into primefaces:master May 9, 2024
2 checks passed
@cetincakiroglu cetincakiroglu removed Status: Pending Review Issue or pull request is being reviewed by Core Team Status: Discussion Issue or pull request needs to be discussed by Core Team labels May 9, 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.

Calendar: Add additional keyboard support
2 participants