Repository navigation
Footer: Your Privacy Choices link and icon (phase 3 of #410) - #414
Merged
Merged
Conversation
Decorative inline SVG of the published opt-out toggle, drawn at the standard 30:14 proportions with fixed colors. Takes a `size` prop (CSS height in px, default 14); width follows the aspect ratio. Shared by the footer link and the embedded viewer (#410). Checked on both footer backgrounds in a browser; not yet used here.
Move the "Privacy settings" button out of the Project link list to the end of the copyright line as "Your Privacy Choices" with the toggle icon. It stays a button carrying data-cookie-open, so it opens the same analytics preference as before. Separators now lead the item they precede and the row clips the one that lands at a wrapped line start, so the longer line no longer strands a dot at tablet widths. Stacks without separators below 600px as before. Adds a source-level wiring test. Tested: lint, typecheck, vitest, build, and Playwright in light and dark at 1280 and 360px (click, keyboard, accessible name). Refs #413
Deploying nemar-website with
|
| Latest commit: |
88016cd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9d13ce0c.nemar-website.pages.dev |
| Branch Preview URL: | https://feature-issue-413-privacy-ch.nemar-website.pages.dev |
The moved button inherited the global button focus style, a box-shadow that forced-colors mode drops, so it showed no focus there. Give it its own 2px outline; the 2px offset stays inside the row's inline padding so overflow-x: clip does not cut it on a wrapped line. Also drop declarations that only repeated the global button reset and correct the comment describing the rule. Tested in Chromium with forcedColors active and normal, light and dark, at 1280, 900 and 700px, including the wrapped-line case. Refs #413
Call the footer item a control rather than a link, and describe the embed use without naming a phase. Refs #413
Pin placement inside the copyright line after the Built with credit and outside any conditional, that the button carries no hiding or renaming attributes, that it keeps a style rule for its class, and that the cookie notice still binds [data-cookie-open]. Check aria-hidden and width on the icon's root svg and forbid currentColor. Drop exact-string pins on the size formula, focusable, and the separator markup. Tested: each of four manual mutations of Footer.astro fails one test. Refs #413
neuromechanist
added a commit
that referenced
this pull request
Oct 5, 2026
Last in the header, the shared PrivacyChoicesIcon from #414 links to /privacy on the serving origin, in a new tab. Its accessible name is a statement, "Privacy: how NEMAR counts embedded views", since nothing can be chosen inside an embed. Narrow-frame header spacing tightens so the header stays two lines at 360 px. Measured in Chromium: no document scroll at 360x480, 800x560 and 1200x720.
This was referenced Oct 5, 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.
Summary
Phase 3 of #410. The footer's "Privacy settings" button becomes a "Your Privacy Choices" control with the standard blue-and-white toggle icon, at the end of the
© … The Regents of the University of California · version · commit · Built with Astro on Cloudflare Pagesline.It is still a
<button type="button" data-cookie-open>, so it opens the same analytics preference as before and ADR 0019's opt-out path is unchanged.CookieNotice.astrobehavior andsrc/lib/cookie-consent.tsare untouched.Refs #413, part of #410. Closing keywords do not fire on staging merges, so #413 is closed by hand after merge.
Changes
src/components/PrivacyChoicesIcon.astro(new, shared): hand-written inline SVG of the published opt-out icon, 30:14 proportions, fixed colors (#06fand white),aria-hidden="true"andfocusable="false". Propsizeis the CSS height in px (default 14); width follows the aspect ratio. Phase 1's embed imports it as<PrivacyChoicesIcon size={14} />.src/components/Footer.astro: the button leaves the Project link list (the Privacy Policy link stays) and moves to the end of the bottom line as· [icon] Your Privacy Choices. The accessible name is the visible text; the icon is hidden from assistive technology. Link color and the hover underline match the other links on that line. The focus ring is a local 2px outline rather than the global box-shadow, because a shadow is dropped in forced-colors mode and the control would show no focus there; the 2px offset keeps the ring inside the row's inline padding so the clip below does not cut it.overflow-x: clipto drop the one that lands at the start of a wrapped line. Below 600 px the row stacks without separators, as before.src/components/CookieNotice.astro: a code comment that named the footer control now uses the new label. No behavior change.test/footer-privacy-choices.test.ts(new): source-level wiring guard in the style offooter-explore-links.test.ts. It pins thedata-cookie-openbutton's placement inside the copyright line after the Built with credit and outside any conditional, that it carries no hiding or renaming attributes, that it keeps a style rule for its class, thatCookieNotice.astrostill binds[data-cookie-open], and the icon's decorative root<svg>.CHANGELOG.md: entry under[Unreleased]/Changed.Decided and left alone: the Settings page keeps its own Privacy card and never names the footer control, so it is unchanged. ADR 0019 mentions "Privacy settings controls" generically in a dated decision record; ADRs are superseded rather than edited, so it is left as written.
The icon follows the artwork Cloudflare ships in its own footer: a white field with a blue check on the left and a blue field with a white cross on the right, inside a blue outline. Blue is 4.55:1 against the light footer background and 3.47:1 against the dark one (above the 3:1 non-text minimum), and the white half carries the dark footer, so no extra outline is drawn.
Sequencing dependency on the docs privacy policy
No test in this repository pins the footer label against the live privacy policy.
copy-drift.tsanddocs-contract-drift.tscompare account copy and docs-auth constants with the nemar-cli contract and never touch the footer. But the published policy (docs.nemar.org/policies/privacy) currently says "under Privacy settings in the website footer", which this PR makes stale on the footer. nemarOrg/docs#60 renames that reference, and per #410 it must merge before this reaches production. Merging this tostagingis safe, since test.nemar.org does not serve the policy; the staging tomainrelease PR should wait for docs#60, and the release checklist should confirm the policy text reads "Your Privacy Choices" first.Verification
bun run lint: cleanbun run typecheck: 0 errors, 0 warnings (12 pre-existing hints)bun run test: 123 files passed, 1 skipped; 2869 tests passed, 7 skipped (12 new); four manual mutations ofFooter.astro(conditional wrapper,aria-label, renamed class, dropped hook) each fail one testbun run build: completebun run dev: footer in light and dark (system preference anddata-themeforced vianemar:theme) at 1280 px and 360 px; the icon and its outline read on both footer backgroundsforcedColors: "active"and in normal mode, light and dark, at 1280, 900 and 700 px (at 900 px the control starts a wrapped line): a solid 2px outline shows in every case and is not clippedoverflow-x: clipdegrades to a visible dot where unsupported)