Improve cookie consent UX and scanner discoverability - #1689
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Primary-action focus coverage is incomplete, and the new footer button has a typography inconsistency.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Improves cookie-consent discoverability, responsive dialog usability, styling, and scanner coverage.
Changes:
- Adds a scanner-addressable Legal “Manage Cookies” action.
- Updates WCP layout, colors, and focus styling.
- Adds component, E2E, accessibility, and scanner regression coverage.
File summaries
| File | Summary |
|---|---|
src/frontend/tests/unit/custom-components.vitest.test.ts |
Adds component markup coverage. |
src/frontend/tests/e2e/cookie-dialog-layout.spec.ts |
Adds responsive and contrast coverage. |
src/frontend/tests/e2e/cookie-consent.spec.ts |
Adds consent-flow and scanner coverage. |
src/frontend/src/styles/wcp-consent.css |
Updates dialog layout, colors, and focus styles. Moderate: add primary-action keyboard-focus assertions. |
src/frontend/src/content/i18n/en.json |
Adds the Manage Cookies translation. |
src/frontend/src/components/starlight/Head.astro |
Updates consent-control documentation comments. |
src/frontend/src/components/FooterSocials.astro |
Removes the mobile footer cookie control. |
src/frontend/src/components/FooterLegal.astro |
Adds the Legal consent action. Nit: align its typography with sibling footer links. |
.github/astro.instructions.md |
Documents scanner configuration and consent testing. |
Review details
Suppressed comments (1)
src/frontend/src/styles/wcp-consent.css:353
- The focus treatment is changed to
--aspire-action-focus, but the new color regression tests only assert resting and hover colors. The layout test checks only that the close button has a solid outline, so a regression that gives Accept or Save changes the wrong focus color would pass; add keyboard-focus assertions for both primary actions in light and dark themes.
outline: 2px solid var(--aspire-action-focus) !important;
- Files reviewed: 9/9 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
James Newton-King (JamesNK)
left a comment
There was a problem hiding this comment.
Reviewed the cookie consent component, delegated interaction path, responsive dialog styles, and regression coverage. No actionable issues found.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Summary
c-uhff-footer_managecookies, reuse the existing consent handler and tour hooks, and preserve regional consent and analytics behavior.--aspire-color-lightbackground resolved to muted gray in light mode.Post-deployment scanner configuration: use
//*[@id="c-uhff-footer_managecookies"]instead of//button[contains(@class, 'cookie-consent-btn')], which matches multiple controls, including hidden responsive variants. Complete the initial banner choice before testing the footer reopening action, particularly on narrow screens. WCP must be initialized in a consent-required context. External scanner settings have not been changed; rerun WebInsights after deployment.Third-party links and affiliations
None.
Validation
git diff --checkpassed.