Repository navigation
Resolve relative item links and name the phase progress bar - #5
Merged
Merged
Conversation
A `links[].url` like `docs/design/blueprint-module.md` was emitted verbatim, so on a consumer site it resolved against that site's origin and 404ed (new-campus#139 worked around it by hand). Both projections now resolve relative links to `https://github.com/<meta.repo>/blob/HEAD/<path>` before they leave — HEAD so the output is identical with and without a token and `build --check` never drifts on a branch rename. Absolute URLs, `mailto:` and `#fragment` pass through; a link that cannot resolve (climbs out of the repo, query-only) is dropped and `validate` warns as V15, naming the item and the link. Documented in README, roadmap-yaml.md and validation.md. Refs #3 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Both renderers emitted `role="progressbar"` as a percentage with no accessible name, so a screen reader announced a bare bar. The bar now carries `aria-label` from the existing localized progress string ("3 of 8 done" / "3 von 8 erledigt"), `aria-valuemin="0"`, `aria-valuemax` = items in the phase and `aria-valuenow` = items done. Markup and class names are otherwise unchanged.
Refs #3
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Two behaviours the first
<Roadmap>consumers (new-campus#142, hn-monorepo#1529) had built into their local renderers and lost when they switched to@hansenexus/nextup/react@0.1.3. Both belong in the package so every site gets them.Closes #3
What
Progress bar gets an accessible name —
ui-react/index.tsx,render-html.ts(the web component andbuild --siteshare this markup; the site template has no bar of its own).Before:
role="progressbar" aria-valuenow="<pct>" aria-valuemin="0" aria-valuemax="100", no name — a screen reader announced a bare bar.After:
role="progressbar" aria-label="3 of 8 done" aria-valuemin="0" aria-valuemax="8" aria-valuenow="3". The label is the existing localizedStrings.progress("3 of 8 done"/"3 von 8 erledigt"), counted in items, not percent. Markup and.nextup-*classes are otherwise identical.Relative item links leave resolved — new
links.ts, applied inproject.ts(toPublicandtoInternal, sobuild,serve,mcpand both renderers all see the same hrefs), warned about invalidate.ts(V15).urlinroadmap.yamldocs/x.md,./docs/x.md,/docs/x.md,docs/x.md#sechttps://github.com/<meta.repo>/blob/HEAD/docs/x.md(fragment/query kept)https://…,//cdn.…,mailto:…,tel:…#section../outside,?query-only, or any relative link with no repo knownvalidatewarns V15 naming item + linkHEADrather than a fetched default branch: GitHub resolves it server-side, so the output is byte-identical with and without a token andbuild --checknever reports drift becausemasterbecamemain.meta.repois required by the schema, so the "no repo" branch is only reachable through theresolveLink(url, repo | null)API; V15 fires on links that cannot map (escape the repo root, query-only).Docs: README (yaml example + rule paragraph),
roadmap-yaml.md(new### linkssection;linkswas mislabelled "internal"),validation.md(V15 row),sites.md,CLAUDE.md("Item links leave resolved").Version bumped to
0.1.4. No tag, no publish.bun run schema:genoutput unchanged.How verified
New tests:
links.test.ts(one case per rule above),project.test.ts(public + internal ship the resolvedexamples/dev-empirelinkdocs/PLAN.md#phasing→…/blob/HEAD/docs/PLAN.md#phasing; mixed list keeps absolute/mailto/fragment and drops../),validate.test.ts(V15 path + message),ui-react/index.test.tsxandview-model.test.ts(exact progressbar attribute string in en and de; neveraria-valuemax="100"),wc/index.test.ts(attributes read back from the shadow root, label followslang).CLI smoke on a scratch roadmap with
docs/design/blueprint-module.mdand../elsewhere.md:🤖 Generated with Claude Code