Skip to content

Web front end (framework-independent) checklist

Copy this list into a pull request, design review or project kickoff and tick what applies. Rules are grouped by level and sorted by score (criteria). Each links to the file that explains it and cites its sources. Automatable names tools that can check the rule in CI (see the file's "How to enforce" section).

Also apply the general checklist.

This file is generated by python3 scripts/rank.py fix from the guidelines. Don't edit it by hand.

  • WEB-2 (9) Use native HTML elements, such as button, a, input and select, before ARIA. (specific/web) Automatable: axe-core rules.
  • WEB-8 (9) Render untrusted data through the framework's automatic escaping or textContent, and sanitize it with DOMPurify before it reaches an HTML sink such as innerHTML or React's dangerouslySetInnerHTML. (specific/web) Automatable: eslint-plugin-astro, eslint-plugin-no-unsanitized.
  • WEB-3 (7) Run automated accessibility checks, such as axe-core, in CI and in end-to-end tests. (specific/web) Automatable: axe-core rules.
  • WEB-4 (7) Measure Core Web Vitals from real users at the 75th percentile, separately for mobile and desktop, and set priorities from that field data. (specific/web) Automatable: Lighthouse CI.
  • WEB-5 (7) Ship less JavaScript: split off code that the first render doesn't need, remove unused code, and use Baseline platform features instead of JavaScript reimplementations. (specific/web) Automatable: Lighthouse CI, Size Limit.
  • WEB-6 (7) Give every image and embed explicit dimensions, offer sizes that fit the layout with srcset and sizes, and lazy-load only images outside the initial viewport. (specific/web) Automatable: Lighthouse CI.
  • WEB-7 (7) Put a content hash or version in the URLs of static assets and cache them for a long time with immutable, and serve HTML with Cache-Control: no-cache (plus private when it's personalised) so that it's always revalidated. (specific/web)
  • WEB-9 (7) Send security headers with every response: Strict-Transport-Security, X-Content-Type-Options: nosniff, a Referrer-Policy, and the CSP frame-ancestors directive against framing. (specific/web) Automatable: HTTP Observatory CLI.
  • WEB-10 (7) Add a strict, nonce- or hash-based Content Security Policy as a second layer of defence against XSS, and try it in Content-Security-Policy-Report-Only mode before enforcing it. (specific/web) Automatable: HTTP Observatory CLI.
  • WEB-14 (7) Find elements in tests the way users find them: by role and accessible name first, then by label or text, and by test ID only when nothing visible identifies the element. (specific/web) Automatable: eslint-plugin-playwright no-wait-for-timeout, eslint-plugin-testing-library no-container.
  • WEB-15 (7) Never wait for a fixed time in a test: use actions that wait automatically and assertions that retry until the page reaches the expected state, such as Playwright's await expect(locator).toBeVisible() or Testing Library's findBy queries. (specific/web) Automatable: eslint-plugin-playwright no-wait-for-timeout.
  • WEB-16 (7) Isolate every test: run it in a fresh browser context, let it build the state and data it needs instead of relying on earlier tests, and when tests change server-side state, give each parallel worker its own user account. (specific/web) Automatable: Vitest sequence.shuffle.
  • WEB-17 (7) Run the end-to-end tests in CI on every pull request, in each browser engine you support, and keep a trace of every failure. (specific/web)
  • WEB-18 (7) Treat a flaky test as a bug: quarantine it outside the blocking pipeline, file a bug for it, and fix it within a set time. (specific/web) Automatable: Playwright failOnFlakyTests.
  • WEB-22 (6) After each client-side navigation in a single-page app, change the document's <title> to describe the new view, and move focus to the new content, such as its main heading, or announce the new page to screen readers. (specific/web)
  • WEB-11 (6) Load third-party scripts with Subresource Integrity, or serve your own reviewed copies. (specific/web) Automatable: HTTP Observatory CLI.
  • WEB-12 (6) Choose a Baseline target, such as Baseline Widely available, from your users' browser data, and set it once in Browserslist so that build and lint tools share it. (specific/web) Automatable: @eslint/css use-baseline, eslint-plugin-compat.
  • WEB-19 (6) Test components in a real browser, for example with Vitest Browser Mode, and keep end-to-end tests to the few user journeys that carry the product's core value. (specific/web)
  • WEB-20 (6) Mock HTTP at the network level, for example with Mock Service Worker, instead of mocking fetch or your API client modules, and make requests without a handler fail the test. (specific/web) Automatable: Mock Service Worker onUnhandledFrame.

Conditional (1–5)

  • WEB-13 (5) Build core user journeys with progressive enhancement: HTML that works on its own first, then CSS and JavaScript that enhance it, so that a script that fails to load doesn't stop users. (specific/web)
  • WEB-21 (5) Keep visual comparison (screenshot) tests to a few stable pages and components, hide dynamic content such as dates, and create and compare the screenshots in the same environment, with the same operating system and browser versions. (specific/web)