[2.0.1] hashHistory: link claims and useLinkState ignore the hash, so aria-current/data-active are wrong on every link
Mantenedores costumam responder em até 1 dia
@clean99 já está trabalhando nisso.
Desde 22/11/2026.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 72/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- frontend
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 1.3k
- Forks
- 193
- Merge médio
- 8h 48min
- PRs com merge (30d)
- 21
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de solidjs/solid-router
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
solidjs/solid-router#757 ·
Mantenedores costumam responder em até 1 dia
-
[2.0.1] Internal links do a full page load on a custom scheme (Electron app://)Talvez já em andamento @saudademjj assumiu há 1 dia. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 20/100
solidjs/solid-router#755 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
[2.0.1] diagnostics: a request for // crashes the dev server (Invalid URL in describeInitial)Talvez já em andamento @bryanlundberg assumiu há 4 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 35/100
solidjs/solid-router#752 ·
Mantenedores costumam responder em até 1 dia
-
liveQuery SSR: the producer of a `live()` server function is never finalized after the response ends (the `return()` queues behind a read-ahead `next()`)Talvez já em andamento @clean99 assumiu há 2 dias. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
solidjs/solid-router#751 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
solidjs/solid-router#736 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de solidjs/solid-router
Issues semelhantes
-
[Bug]: A Markdown link with both a :line suffix and a #L fragment opens a path containing ":line"Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
status:needs-triage type:bug workstream:refimpl
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
GenAI-Security-Project/agent-control-standard#764 ·
Mantenedores costumam responder em até 1 dia
-
good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
TanbirRamim/vibereel#39 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
lingdojo/kana-dojo#34988 · 1 comentário · 5 reações ·
Mantenedores costumam responder em até 1 dia