Repository navigation
fix(website): apply a CSP on GitHub Pages, make scrollers focusable, tidy the menu - #604
Merged
Merged
Conversation
…igures pause "Get started" rendered dark text on blue (2.0:1) because .nav-links a beat .btn-primary. The Paper theme was patched on at the end of styles.css, so the button's colors move to their own rule and the patch goes. One --ok could not pass on both the light page and the dark code blocks, so code gets its own tokens. The table's Yes and No, terminal titles, comments and prompts and the skip link now meet 4.5:1. On phones five timeline buttons needed 357px of 309px and the figure hid the fifth. They wrap to 3 + 2. Both looping figures gain a pause button (WCAG 2.2.2), which stays hidden when motion is reduced because nothing loops then.
…tidy the menu GitHub Pages serves the site and ignores _headers, so no Content-Security-Policy ever reached a browser. The policy now sits in a meta tag too; frame-ancestors cannot, and the other headers still need another host. Code blocks and the comparison table scroll sideways on phones, so they take focus and carry labels. The hero terminal loses role="img", which would have hidden that focusable child. The menu closes on Escape, returns focus, resets its label after a link and has a 44px toggle. Touch screens no longer show hover and key hints, and the "1-5 phase" hint goes because those keys never existed. EB Garamond joins the main font link instead of an @import, the screenshots get dimensions, and demo.gif and the stale v1.0 go.
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.
Merge #603 first. This branch sits on top of it, so the diff here includes #603's commit until that lands.
Why
These are the audit's six P2s and one P3. The most consequential: no security header has ever reached a visitor, because GitHub Pages serves the site and ignores
_headers.What changed
_headersis also in a<meta>tag, with a referrer policy. The README says to change both together.role="img", which would have hidden a focusable child.@importto the main font link.website/assets/demo.gif(3.7 MB; the README uses its own copy indocs/assets) and the stalev1.0in the hero terminal.Scope changes
role="region"was dropped from the scroll areas becausehtml-validaterejects it; the label and focus remain.Checks
html-validate@9, as CI runs it, passes, and every local asset resolves.impeccable detect: no contrast findings at either width. Remaining findings are the structure and typography items from the audit.Not tested
The CSP on the live domain, emulated reduced motion, a full Tab walk, a screen reader, and a real phone.
Deliberately not done
frame-ancestors,nosniffandX-Frame-Optionscannot be set from a<meta>tag, so they need a host that supports headers.