[2.0.1] hashHistory: link claims and useLinkState ignore the hash, so aria-current/data-active are wrong on every link
I maintainer di solito rispondono entro 1 giorno
@clean99 ci sta già lavorando.
Dal 22/11/2026.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- frontend
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 1.3k
- Fork
- 193
- Merge medio
- 8h 48m
- PR unite (30g)
- 21
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di solidjs/solid-router
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
solidjs/solid-router#757 ·
I maintainer di solito rispondono entro 1 giorno
-
[2.0.1] Internal links do a full page load on a custom scheme (Electron app://)Forse già presa @saudademjj l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 20/100
solidjs/solid-router#755 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[2.0.1] diagnostics: a request for // crashes the dev server (Invalid URL in describeInitial)Forse già presa @bryanlundberg l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
solidjs/solid-router#752 ·
I maintainer di solito rispondono entro 1 giorno
-
liveQuery SSR: the producer of a `live()` server function is never finalized after the response ends (the `return()` queues behind a read-ahead `next()`)Forse già presa @clean99 l’ha presa 2 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
solidjs/solid-router#751 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
solidjs/solid-router#736 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di solidjs/solid-router
Issue simili
-
area:api bug good first issue priority:high
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Doezer/Questarr#1486 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area:import difficulty:good-first good first issue help wanted priority:P1 roadmap size:S type:test
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Sergey-Bar/Penny#245 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
mihazs/lazysh#3377 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Approve the Cloudflare agent plugin for harness sessionsForse già presa @joshtsch l’ha presa oggi. Apertaenhancement ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno