Consent compliance: docs, agent guide, skills, changelog, shared behaviour spec, browser check, reference e2e

- docs/consent.md: compliance defaults, Global Privacy Control, withdrawal, consent log on by default and the SQL
  migration; no more "UODO requirement" or "GPC not needed". docs/analytics.md: what Consent Mode advanced sends.
- docs/consent-behaviour-spec.md: the behaviour IAPL and IAWL share, with the 13-item test list.
- CHANGELOG 1.17.0: the SQL migration first, a before → after table for an existing site.
- AGENT.md, iapl-setup / iapl-upgrade / iapl-reference / iapl-consent-check, PROGRAMISTA item 78; reference skills copy.
- iapl-consent-check: Global Privacy Control, equal prominence and withdrawal runs; Google asset warnings.
- Reference site uses the new defaults; e2e for GPC, a stale grant, equal prominence, withdrawal; e2e:built runs every
  consent test in both bundlers. YouTubeEmbed warns in development without a poster.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-26 13:48:19 +01:00
co-authored by Claude Opus 5.5
parent 99036eb70c
commit f5c53e4523
33 changed files with 821 additions and 112 deletions
+9 -3
View File
@@ -1,6 +1,6 @@
'use client'
import { useState } from 'react'
import { useEffect, useState } from 'react'
type YouTubeEmbedProps = {
/** Classes per element; nothing is styled by default (keep the aspect ratio in your CSS). */
@@ -10,8 +10,9 @@ type YouTubeEmbedProps = {
/** Accessible name of the play button, from the panel ("Play: <title>"). */
playLabel: string
/**
* Poster URL — your own upload (no request to Google until play) or omit to
* use YouTube's thumbnail (i.ytimg.com, no cookies).
* Poster URL — your own upload (no request to Google until play). Omitted, YouTube's thumbnail
* (i.ytimg.com, no cookies) loads with the page: a request to Google before any choice, which the consent check
* reports as a warning. New sites pass a poster; a development warning says so.
*/
poster?: string
/** Video title, from the panel — iframe title for screen readers. */
@@ -29,6 +30,11 @@ type YouTubeEmbedProps = {
export function YouTubeEmbed({ classNames = {}, note, playLabel, poster, title, videoId }: YouTubeEmbedProps) {
const [playing, setPlaying] = useState(false)
const id = /^[\w-]{6,20}$/.test(videoId) ? videoId : ''
useEffect(() => {
if (!poster && id && process.env.NODE_ENV !== 'production') {
console.warn(`[iapl] <YouTubeEmbed videoId="${id}"> has no poster: YouTube's thumbnail loads from Google before any choice — pass an uploaded poster (docs/storage.md)`)
}
}, [poster, id])
if (!id) {return null}
if (playing) {
return (