Set the sequential focus navigation starting point without location.replace
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
reset_focus sets the sequential focus navigation starting point with location.replace('#id') (client.js:3792 at 2eed63867), then undoes the side effects: the popstate it fires, the nulled history.state, and the scroll. It still leaks a hashchange to app listeners.
Giving the target tabindex="-1", calling focus({ preventScroll: true, focusVisible: false }) and removing the attribute sets the starting point in all three engines with none of those side effects. It was option 1 in #10856, passed over for the focus ring, which focusVisible now removes.
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 at reset_focus in client.js:3792 and read the discussion of option 1 in issue #10856. Verify the focus-starting behavior across the relevant browser engines, then confirm that the change avoids popstate, history.state, scrolling, and hashchange side effects while preserving focus-ring behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100