From c1343f91f23fe80d75a11ece9b9a881a4823c5b0 Mon Sep 17 00:00:00 2001 From: Jason E Plumb Date: Fri, 5 Jun 2026 14:16:11 -0700 Subject: [PATCH 1/2] feat(consent): require scrolling the terms before enabling "I agree" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first-run consent dialog's "I agree — continue" button now starts disabled and unlocks only once the user scrolls to the bottom of the terms (#consent-body), so acceptance follows actually seeing the full Privacy Policy + Terms of Use. - Accept button renders `disabled` (dimmed, not-allowed cursor); a small hint ("Please scroll to the bottom to continue.") shows beneath the actions while locked. - Unlocks on scroll-to-bottom (4px tolerance for sub-pixel rounding), hiding the hint. - If the terms already fit without scrolling (tall viewport), enables immediately — nothing to scroll past. - Re-checked on resize so rotating to a layout where the content fits also unlocks it. - The terms region is now focusable (tabindex=0) and receives initial focus, so keyboard users can scroll to read (and unlock) instead of landing on a disabled button. Decline stays enabled throughout. - The window resize listener is cleaned up on close (incl. decline-before-scroll). Closes #225 Co-Authored-By: Claude Opus 4.8 --- src/consent.ts | 43 +++++++++++++++++++++++++++++++++++++------ src/style.css | 15 +++++++++++++++ 2 files changed, 52 insertions(+), 6 deletions(-) diff --git a/src/consent.ts b/src/consent.ts index d273c8c..fc30585 100644 --- a/src/consent.ts +++ b/src/consent.ts @@ -37,7 +37,7 @@ export function showConsentModal(): Promise { panel.innerHTML = `

webmap.dev — privacy-first GPS mapping, no account required

-