shipshapecode / shipshapecode/shepherd
Keyboard navigation triggers next rather than action button
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13.8k
- Forks
- 658
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 15
Description
This is something we intended to look at as part of our project but we've run out of time / budget - so I'm raising it, in case anyone else is able to.
I've set up a number of tour steps, most of which have Back and Next buttons but for some steps I've replaced the 'Next' button with a custom action (mostly basic stuff - e.g. click a menu link and then call next).
This works fine when navigating the tour using the mouse but, if you use the keyboard navigation - the right arrow key will always just move the user to the next tour step and never trigger the custom action.
Could there be a way to specify which button should be triggered by the left and right arrow keys? Or, as a bit of a fudge, could the right arrow key trigger the first button on that step which has an action with a class of 'next-button' (and vice versa for the back button)?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the tour's keyboard-navigation handling and the action-button configuration described in the issue. Trace how left and right arrow keys currently advance steps, then determine how custom actions and Back/Next buttons are represented. Done means keyboard navigation invokes the intended action for steps that replace the default Next button, with the existing mouse behavior preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- accessibility, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100