Part of #749. Split out of #751 because it changes what the reference sample renders, rather than adopting an API mechanically.
samples/hydrogen's NavBar decides the current page with page === mainNode — reference equality on two Graal host proxies, which are not the same object. So aria-current never appears on the canonical navigation sample today. <JLink node={page} /> compares identifiers, and it starts appearing.
That is a fix, but it is newly visible output on the sample everyone copies, and it comes with a caching obligation the monorepo has never mentioned.
Depends on #751 (the <JLink> implementation).
Part of #749. Split out of #751 because it changes what the reference sample renders, rather than adopting an API mechanically.
samples/hydrogen's NavBar decides the current page withpage === mainNode— reference equality on two Graal host proxies, which are not the same object. Soaria-currentnever appears on the canonical navigation sample today.<JLink node={page} />compares identifiers, and it starts appearing.That is a fix, but it is newly visible output on the sample everyone copies, and it comes with a caching obligation the monorepo has never mentioned.
<JLink node={page} />, label derived from the page.properties: { "cache.mainResource": "true" }.aria-currentis a function of the main resource, andPathCacheKeyPartGeneratorleaves the main resource out of the fragment cache key unless the view opts in — so a nav shared across pages is cached once and replayed with the wrong entry marked current. See cache.mainResource: make current-page state safe to cache #755.aria-currentfollows.Depends on #751 (the
<JLink>implementation).