react-day-picker icon indicating copy to clipboard operation
react-day-picker copied to clipboard

feat(accessibility): Shift+Arrows to navigate months/years

Open mhwice opened this issue 8 months ago • 1 comments

What's Changed

I added a Shift modifier to the keyboard navigation. Specifically,

Shift + ArrowLeft moves the focus to the previous month. Shift + ArrowRight moves the focus to the next month. Shift + ArrowUp moves the focus to the previous year. Shift + ArrowDown moves the focus to the next year.

This feels quite natural and can be useful for those without PageUp/Down buttons on their keyboards.

mhwice avatar Jun 03 '25 06:06 mhwice

Thanks @mhwice looking good! Pushed some updates to fix the failing test, added a test and updated the docs.

@rodgobbi what do you think?

gpbl avatar Jun 03 '25 09:06 gpbl

Sorry @gpbl, it took me a while to see this PR. Looks good indeed!

rodgobbi avatar Jun 17 '25 01:06 rodgobbi

Sorry @gpbl, it took me a while to see this PR. Looks good indeed!

Ah thanks for checking it out! I merged it assuming you were busy :)

gpbl avatar Jun 17 '25 11:06 gpbl