Repository navigation
fix(CookieConsent): a dismissed banner leaves the accessibility tree, and its title is not a heading - #30
Merged
Conversation
… and its title is not a heading Hidden meant opacity: 0, which kept three focusable buttons and an <h6> in every page's accessibility tree after consent, and made the <h6> break heading order on pages with an <h1>/<h2> (Lighthouse heading-order). Hidden is now display: none + aria-hidden; the title is bold text inside a labelled region. Rendered unconditionally as before, so server and first client render agree. Scaffald/SaaS#774, Scaffald/SaaS#452 Co-Authored-By: Claude Fable 5.1 <[email protected]>
This was referenced Sep 17, 2026
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.
What
CookieConsentBannerhid itself withopacity: 0. That kept three focusable buttons and an<h6>in the accessibility tree and tab order on every page after consent, and the<h6>broke heading order on any page with an<h1>/<h2>— Lighthouse'sheading-orderaudit on scaffald.com's/and/contact(Scaffald/SaaS#774). It was also why 'did the banner hide?' DOM probes kept answering no (Scaffald/SaaS#452).display: none+aria-hidden. Still rendered unconditionally, so the server and the client's first render agree (the provider's hydration note stands).Textinside arole="region"labelled 'Cookie consent', not aHeading.testID="cookie-consent-banner"on the container, for probes.Verification
3 new tests (react-dom render): hidden until the storage read resolves then shown; stays hidden when consent exists; no heading role, region present. Typecheck and biome clean. Lighthouse
heading-orderon the consumer's landing and contact pages goes from failing to passing in the Scaffald/SaaS PR that bumps the pointer.🤖 Generated with Claude Code