fix: preserve SSG styles and accessible names - #33
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses two regressions introduced after upgrading Askr packages: missing theme-generated CSS in statically generated HTML (causing potential CLS/FOUC) and accessibility issues from conflicting or ambiguous accessible names.
Changes:
- Wrap the SSG document renderer with
withThemeStylesso the initial generated style registry is emitted during static generation. - Extend static output verification to assert presence/consistency of the generated-style registry and per-class rules.
- Adjust accessible names by hiding the search shortcut from the accessibility tree and renaming the footer root link to “Home”, with regression tests.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
ssg.config.ts |
Wraps SSG document rendering with withThemeStyles to serialize initial theme styles into generated HTML. |
scripts/verify-static-output.ts |
Adds verification for generated ak-style-* usage vs. presence/contents of the style registry in built HTML. |
src/pages/docs/search.tsx |
Hides the visual shortcut <kbd> from the accessibility tree while keeping the button’s accessible name stable. |
src/pages/site-footer.tsx |
Renames the root destination link text from “Overview” to “Home” to avoid identical-link ambiguity. |
tests/accessibility-contract.test.tsx |
Adds semantic regression tests for the search trigger labeling and footer home link text. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
smiggleworth
added a commit
that referenced
this pull request
Aug 1, 2026
* fix: preserve SSG styles and accessible names * fix: enforce static style registry contract
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.
Summary
TDD evidence
npm run checkpassed with 24 tests, a 340-route build, full static verification, and 33,343 API anchorsCloses #31
Closes #32