Skip to content
Bug reportNov 30, 2026· 0:30· 15 views

TanStack Router 1.170.46: navigating to /settings/privacy marks both /settings and /settings/privacy links as aria-current="page"

0:30 total

Comments · 0

Be the first to comment.

Bug reportby SceneRecap AI

mediumLink component active state logic in @tanstack/react-router. With activeOptions.exact false, the fuzzy active match for a parent route seems to also set aria-current="page". aria-current="page" should likely depend on an exact location match, separate from the active styling.
os: macOSdpr: 1locale: en-USbrowser: Chromium 151.0.7922.34package: @tanstack/react-router@1.170.46 via esm.shtimezone: Europe/Berlinviewport: 1280x720issue_ref: #8979router_config: Default activeOptions.exact: false

Repro steps

  1. 1.Open the test page. It loads on the Home route with Home page content.
  2. 2.Click the link Settings. The Settings overview loads and the badge reports 1 element with aria-current="page": /settings.
  3. 3.Click the link Settings / Privacy.
  4. 4.Observe that both Settings and Settings / Privacy are highlighted and the badge reports 2 elements with aria-current="page".
  5. 5.Click the link Settings / Security.
  6. 6.Observe that both Settings and Settings / Security are highlighted and the badge reports 2 elements with aria-current="page".

Expected

Only the link that matches the current location should carry aria-current="page". On /settings/privacy only the Settings / Privacy link should have it. On /settings/security only the Settings / Security link should have it. The parent Settings link may be styled active, but it should not be announced as the current page.

Actual

On /settings/privacy both the /settings and /settings/privacy links carry aria-current="page" at the same time. On /settings/security both the /settings and /settings/security links carry it. The status badge turns red and reports 2 elements.

Evidence

visualInitial Home route. Green badge reads 0 element with aria-current="page" while the Home link is visually highlighted. This is a side observation and not part of the main failure.
visualControl case, working: after clicking Settings, the green badge reads 1 element with aria-current="page": /settings. Only the Settings link is highlighted and the content shows Settings overview.
visualAfter clicking Settings / Privacy, a red badge reads 2 elements with aria-current="page": /settings and /settings/privacy. Both links are highlighted. Content shows Settings overview and Privacy settings.
visualThe double aria-current state on /settings and /settings/privacy persists unchanged.
visualAfter clicking Settings / Security, a red badge reads 2 elements with aria-current="page": /settings and /settings/security. Settings / Privacy is no longer highlighted. Settings and Settings / Security are both highlighted.
visualThe double aria-current state on /settings and /settings/security persists.
Issue markdown (copy-paste ready)
## Summary

In `@tanstack/react-router@1.170.46` with default `activeOptions.exact: false`, navigating to a nested route sets `aria-current="page"` on both the parent link (`/settings`) and the child link (`/settings/privacy` or `/settings/security`). Only one element should represent the current page. Related issue: #8979.

## Environment

- Chromium 151.0.7922.34, macOS
- Viewport 1280x720, DPR 1
- `@tanstack/react-router@1.170.46` via esm.sh
- Default `activeOptions.exact: false`

## Steps to reproduce

1. Open the test page. It loads on Home (1.0s).
2. Click **Settings** (7.66s). The badge shows `1 element with aria-current="page": /settings` (9.0s). This control case works.
3. Click **Settings / Privacy** (12.58s).
4. Observe the badge and the link highlights (15.0s).
5. Click **Settings / Security** (19.09s).
6. Observe the badge and the link highlights (21.0s).

## Expected

Only the link that exactly matches the current location has `aria-current="page"`. On `/settings/privacy` that is Settings / Privacy only. On `/settings/security` that is Settings / Security only. The parent link can keep active styling without being announced as the current page.

## Actual

- At 15.0s the badge reads `2 elements with aria-current="page": /settings and /settings/privacy`. Both links are highlighted.
- At 21.0s the badge reads `2 elements with aria-current="page": /settings and /settings/security`. Both links are highlighted.
- The state persists (19.0s, 23.0s).

## Control

On `/settings` alone (9.0s) exactly one element has `aria-current="page"`. This is correct.

## Side observation

At 1.0s on Home, the Home link looks highlighted but the badge reports 0 elements with `aria-current="page"`. It may be worth checking, but it is separate from this report.

## Impact

Screen reader users hear two links announced as the current page in nested navigation. This breaks the meaning of `aria-current="page"`.

## Suggested area

Link active state logic. The fuzzy match (`exact: false`) seems to also drive `aria-current="page"`. `aria-current="page"` should likely require an exact location match.

*Recorded with SceneRecap.*

This report was written by SceneRecap from a screen recording. Try SceneRecap free

Turn a screen recording into a bug report like this one.

Repro steps, expected vs actual and the console and network evidence, each with a timestamp. On every plan, Free included.

Try SceneRecap free →
TanStack Router 1.170.46: navigating to /settings/privacy marks both /settings and /settings/privacy links as aria-current="page" · SceneRecap