[2.0.1] hashHistory: link claims and useLinkState ignore the hash, so aria-current/data-active are wrong on every link
Maintainers usually reply within 1 day
@clean99 is already working on this.
Since Nov 22, 2026.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start by tracing how hashHistory() represents the current location and how link claims and useLinkState compare it with paths nodes and string URLs. The report includes a reproduction app, so use it to check / and /applications in hash mode, then compare with browserHistory(). Done means only the link for the current page receives aria-current="page" and data-active in both routes.
Written by the indexing model from the issue text.
Description
Describe the bug
With hashHistory(), the router puts aria-current="page" and data-active on the wrong links.
In hash mode, links built with paths render as #/ and #/applications:
- On
/#/, both links are marked as current and active. - On
/#/applications, neither link is marked.
What works correctly:
- Navigation: clicking the links goes to the right page.
- The same app with
browserHistory(): only the current page's link is marked. useLinkStategiven apathsnode. Given the plain string"#/applications", it is wrong too (inverted).
Versions: @solidjs/router 2.0.1 (also 2.0.0 and current main), solid-js 2.0.3, @solidjs/web 2.0.3, @solidjs/vite-plugin 3.0.1, vite 8.3.8.
Your Example Website or App
https://github.com/hapreanmanuel/solid-router-hashhistory-link-state-bug
Steps to Reproduce the Bug or Issue
- Open the app on
/#/(Home). Both links are highlighted:<a href="#/">and<a href="#/applications">both havearia-current="page"anddata-active. - Click "Applications". The Applications page renders, but neither link has
aria-currentordata-active. - Reload the page on
/#/applications. Still neither link.
Expected behavior
Only the link to the current page is marked, like with browserHistory():
- On
/#/, only Home hasaria-current="page"anddata-active. - On
/#/applications, only Applications does.
Screenshots or Videos
No response
Platform
- OS: Windows 11
- Browser: Chrome, reproduced in Chromium 156
- Version: @solidjs/router 2.0.1
Additional context
Claude Code has helped me discover this bug, as well as building the sample to showcase it and report it.
I did my best to understand and check it myself before reporting it, as well as searching the active submitted issues for it, without finding any match.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 193
- Avg merge
- 8h 48m
- Merged PRs (30d)
- 21
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from solidjs/solid-router
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
solidjs/solid-router#757 ·
Maintainers usually reply within 1 day
-
[2.0.1] Internal links do a full page load on a custom scheme (Electron app://)Possibly taken @saudademjj claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 20/100
solidjs/solid-router#755 · 1 comment ·
Maintainers usually reply within 1 day
-
[2.0.1] diagnostics: a request for // crashes the dev server (Invalid URL in describeInitial)Possibly taken @bryanlundberg claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
solidjs/solid-router#752 ·
Maintainers usually reply within 1 day
-
liveQuery SSR: the producer of a `live()` server function is never finalized after the response ends (the `return()` queues behind a read-ahead `next()`)Possibly taken @clean99 claimed this 2 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
solidjs/solid-router#751 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
solidjs/solid-router#736 · 1 comment ·
Maintainers usually reply within 1 day
All issues in solidjs/solid-router
Similar issues
-
area:api bug good first issue priority:high
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Doezer/Questarr#1486 · 1 comment ·
Maintainers usually reply within 1 day
-
area:import difficulty:good-first good first issue help wanted priority:P1 roadmap size:S type:test
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Sergey-Bar/Penny#245 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mihazs/lazysh#3377 · 2 comments ·
Maintainers usually reply within 1 day
-
Approve the Cloudflare agent plugin for harness sessionsPossibly taken @joshtsch claimed this today. Openenhancement ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day