In an aidd repository, use when code touches HTML, CSS, browser JavaScript or TypeScript, UI components, forms, cookies, Content Security Policy, Core Web Vitals, or WCAG.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Web Front End?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/thaithienvanid-web-front-end)
---
name: web-front-end
description: "In an aidd repository, use when code touches HTML, CSS, browser JavaScript or TypeScript, UI components, forms, cookies, Content Security Policy, Core Web Vitals, or WCAG."
---
<!-- generated by `aidd gen-docs` from schemas/packs.json; edit the registry, not this file -->
# Web front end
## Scope
Applies when the change touches HTML, CSS, browser code. Not when the screen is a native mobile app, or the change is server-only. Neighbours: `aidd-team:accessible-ui`, `aidd-team:prototyping`, `aidd-team:product-defaults`.
## Standards
| # | Standard | Edition | Checked | Source |
| --- | --- | --- | --- | --- |
| S1 | WCAG 2.2, level AA | 2.2 | 2026-10-16 | <https://www.w3.org/TR/WCAG22/> |
| S2 | Core Web Vitals (LCP, INP, CLS) | 2024 thresholds | 2026-10-16 | <https://web.dev/articles/vitals> |
| S3 | Content Security Policy, with Trusted Types for DOM injection sinks | Level 2; Trusted Types (W3C Working Draft, 2026-06-23) | 2026-10-16 | <https://www.w3.org/TR/CSP3/> |
| S4 | OWASP Cheat Sheet Series (XSS, CSRF, clickjacking) | — | 2026-10-16 | <https://cheatsheetseries.owasp.org/> |
| S5 | Design tokens (W3C Design Tokens format) and a design system over one-off styles (emerging) | 2025.10 | 2026-10-16 | <https://www.designtokens.org/TR/2025.10/format/> |
| S6 | Baseline (web-features): the browser support target | Baseline Widely available | 2026-10-16 | <https://web.dev/baseline> |
| S7 | Subresource Integrity and Permissions Policy | SRI (W3C Recommendation, 2016); Permissions Policy (W3C Working Draft, 2026-09-22) | 2026-10-16 | <https://www.w3.org/TR/2016/REC-SRI-20160623/> |
| S8 | ePrivacy Directive Art. 5(3): consent before storing or reading on a user's device | Directive 2002/58/EC, Art. 5(3); EDPB Guidelines 2/2023 v2.0 | 2026-10-16 | <https://www.edpb.europa.eu/documents/guideline/guidelines-22023-on-technical-scope-of-art-53-of-eprivacy-directive_en> |
| S9 | Rendering on the web: static, server, and client rendering, and hydration | web.dev | 2026-10-17 | <https://web.dev/articles/rendering-on-the-web> |
| S10 | EU Cyber Resilience Act for products with digital elements | Regulation (EU) 2024/2847 | 2026-10-22 | <https://digital-strategy.ec.europa.eu/en/policies/cyber-resilience-act> |
| S11 | Modern Web Guidance (Google Chrome): web platform guidance for coding agents, cited and never copied (emerging) | 1.0.0 | 2026-11-12 | <https://github.com/GoogleChrome/modern-web-guidance/releases> |
| S12 | agent-browser (Vercel Labs): a browser a role drives from the shell, for its own look at a running page (emerging) | rolling, as read on 2026-11-12 | 2026-11-12 | <https://github.com/vercel-labs/agent-browser> |
## Dated obligations
| From | Obligation | Standard |
| --- | --- | --- |
| 2026-09-11 | CRA reporting applies where the front end is part of a product with digital elements (`aidd-team:incident-response`), and the main obligations from 2027-12-11. A website that supports no product's function is out of scope (Recital 12). | S10 |
| 2026-12-09 | Beside the CRA, the EU Product Liability Directive (EU) 2024/2853: software placed on the market after this date is a product, and a missing update can make it defective. | S10 |
## Checklist by loop step
| Step | Item | Standard |
| --- | --- | --- |
| Before the first edit (`aidd risk --paths`) | Name the pages, components, and states the change touches; a user-facing change needs the product designer and `design-files` docs. A front end that is part of a product with digital elements is in CRA scope. A site that sells to EU consumers, or offers banking, e-books, or passenger transport, meets the European Accessibility Act, which builds on WCAG. | S1, S10 |
| Before the first edit (`aidd risk --paths`) | Product defaults (`dark_mode`, `responsive`, `i18n_ready`, `perf_budget`, `public_page_basics`, `legal_placeholders`, `transactional_email`, `security_headers`): build each one `project.defaults.disabled` does not name, as `aidd-team:product-defaults` says. | — |
| Specify | Acceptance names every state per screen (empty, loading, error, partial, success, offline) and the keyboard path through it. | S1 |
| Specify | The browser support target is Baseline Widely available (or a named Baseline year) in the Spec. A feature inside that target is the default and needs no fallback. A feature outside it, such as a newly available one, has a stated fallback and what the person sees in it. A feature with limited availability, such as one in a single engine, is used only when the Spec names it and its fallback. Look each feature's status up in the web-features data on the day, never from memory. | S6 |
| Specify | No non-essential cookie, storage, or tracker runs before consent where ePrivacy Art. 5(3) applies. A Global Privacy Control signal is an opt-out where a US state law requires it, as California, Colorado, Connecticut, Texas, and others do. | S8 |
| Specify | Rendering per route: static or server-rendered by default, client-rendered only for an app-like screen; the Spec names the JavaScript each route hydrates. Server data lives in one query cache with its staleness (`aidd-team:caching`), and UI state stays local or in the URL. | S9 |
| Implement | Semantic HTML first, ARIA only where HTML has no element; focus order and a visible focus ring preserved. A platform feature comes before a library or custom code, once it meets the browser support target. Examples: the `dialog` element over a custom overlay, the `:user-invalid` state over a script on blur, and container queries over viewport queries for a component's own layout. Modern Web Guidance, where the team has it, has a guide for many such features, with their fallbacks. It is an input to the choice and never a rule, and a role copies none of its text. Its command-line tool sends usage data to Google by default; `DISABLE_TELEMETRY=1` stops it. | S1, S6, S11 |
| Implement | No inline script and no `unsafe-inline`: nonces or hashes under the CSP. Every third-party script is named in the Spec and pinned with `integrity` (SRI), or self-hosted when its bytes change by design. A `Permissions-Policy` turns off the features the page does not use. | S3, S7 |
| Implement | Session cookies are `Secure`, `HttpOnly`, and `SameSite=Lax` or `Strict`, with the `__Host-` prefix. A state-changing request checks a CSRF token or the `Origin` header. | S4 |
| Implement | Animate `transform` and `opacity` where you can: a layout property shifts the layout (CLS) and costs a frame. Motion has a reduced alternative (`prefers-reduced-motion`). | S2 |
| Verify | A role looks at the running page with the Playwright MCP tools that the product designer and the verifier already use. Where the harness gives a role no browser tools and a shell command is all it has, agent-browser (emerging) is one way to look at the page. A role that starts its background daemon closes it before it hands off. A committed end-to-end test stays with the runner the open choice `web-front-end:e2e-test` names. | S12 |
| Review | Untrusted strings reach the DOM only through escaping or a sanitizer, with Trusted Types enforced (`require-trusted-types-for 'script'`) where the engines support it; URLs are validated before `href` or `src`. | S4, S3 |
| Roll out | Core Web Vitals field data and the client error rate are the observe signals. | S2 |
## Test commands
| Command | Proves | How | Standard |
| --- | --- | --- | --- |
| CSP evaluation | no `unsafe-inline` and no wildcard source in the policy | Google CSP Evaluator or a lint step in CI | S3 |
| ESLint accessibility and security rules | no accessibility or injection anti-pattern in the code | `eslint` with the accessibility rules for the team's `web-framework` (`eslint-plugin-jsx-a11y@6.10.2` on JSX, `eslint-plugin-vuejs-accessibility` on Vue templates) and `eslint-plugin-security@4.1.0`, in the test commands | S1, S4 |
| Design-token lint | no raw color, size, or space outside the repository's design tokens | `stylelint@17.15.0` with `color-no-hex` and the `stylelint-declaration-strict-value@1.12.1` plugin's `scale-unlimited/declaration-strict-value` on color properties; on JSX, ESLint `no-restricted-syntax` on a literal color in a `style` object | S5 |
| Browser support check | no API outside the Baseline target without a fallback | `eslint-plugin-compat` (7.0.2) with the browserslist query `baseline widely available` (browserslist 4.29.3), in the lint step | S6 |
| Cookie and tracker consent test | no non-essential cookie, storage, or third-party request before consent, and none after a refusal or a `Sec-GPC: 1` request | the team's `e2e-test` runner, by default `@playwright/test` (1.64.1), in a fresh context: record cookies, storage, and requests before and after each consent choice | S8 |
- From `aidd-team:accessible-ui`: Accessibility per state, Comfort checks, Keyboard-only flows.
- From `aidd-team:prototyping`: Screenshot matrix.
- From `aidd-team:product-defaults`: Performance budget, Both themes, Responsive and targets, Security headers.
## References
- [references/open-choices.md](references/open-choices.md): its open choices, with aidd's defaults.
## Keep it current
Each entry is due after its `review_every_days` (else emerging 90 days, established 365) or by its `review_due`. An emerging one applies only when the change needs it, said in the Spec. One `aidd eval standards` lists as due is looked up in Specify, and a missing one is proposed to aidd's `schemas/industry-standards.json`.