[2.0.1] hashHistory: link claims and useLinkState ignore the hash, so aria-current/data-active are wrong on every link
Maintainer antworten meist innerhalb von 1 Tag
@clean99 arbeitet bereits daran.
Seit 22.11.2026.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 72/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- frontend
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 1.3k
- Forks
- 193
- Ø Merge
- 8 Std. 48 Min.
- Gemergte PRs (30 T.)
- 21
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus solidjs/solid-router
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
solidjs/solid-router#757 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[2.0.1] Internal links do a full page load on a custom scheme (Electron app://)Evtl. vergeben @saudademjj hat das vor 1 Tag übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 20/100
solidjs/solid-router#755 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
[2.0.1] diagnostics: a request for // crashes the dev server (Invalid URL in describeInitial)Evtl. vergeben @bryanlundberg hat das vor 4 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 35/100
solidjs/solid-router#752 ·
Maintainer antworten meist innerhalb von 1 Tag
-
liveQuery SSR: the producer of a `live()` server function is never finalized after the response ends (the `return()` queues behind a read-ahead `next()`)Evtl. vergeben @clean99 hat das vor 2 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
solidjs/solid-router#751 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
solidjs/solid-router#736 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in solidjs/solid-router
Ähnliche Issues
-
blocklist addition
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 76/100
MetaMask/eth-phishing-detect#319194 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
continuedev/continue#13533 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 6 Tagen
-
bug codex:automation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
genfeedai/genfeed.ai#12060 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bounty good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
fitzss/valun-open#15 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag