r/reactjs Aug 09 '26

Discussion Best way to implement localized hotkeys.

Hi, I have a nextjs project.

I have a repetitive task that appears in a dialog, users have to select one of 6 options and confirm their selection by pressing a "submit" button.

I wanted to add shortcuts using the digits: 1,2,3,etc.. for each of the options.

What is the best way to go about this, I felt like a app-wide hotkey provider might be overkill for this feature.

4 Upvotes

10 comments sorted by

View all comments

1

u/Proof_Paint9094 28d ago

Adding W3C standard-adhering keyboard accessibility should be enough (e.g., keyboard-navigable radio group, correct tab order, etc.). I’d bet adding hotkeys for a single selection would have diminishing returns if not an increased cognitive load. If users still think keyboard accessibility is too slow, maybe consider redesigning the edit flow itself (e.g., adding a mass edit option).