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.
Strongly recommended (9–10)¶
-
WEB-2(9) Use native HTML elements, such asbutton,a,inputandselect, before ARIA. (specific/web) Automatable: axe-core rules. -
WEB-8(9) Render untrusted data through the framework's automatic escaping ortextContent, and sanitize it with DOMPurify before it reaches an HTML sink such asinnerHTMLor React'sdangerouslySetInnerHTML. (specific/web) Automatable: eslint-plugin-astro, eslint-plugin-no-unsanitized.
Recommended (6–8)¶
-
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 withsrcsetandsizes, 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 withimmutable, and serve HTML withCache-Control: no-cache(plusprivatewhen 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, aReferrer-Policy, and the CSPframe-ancestorsdirective 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 inContent-Security-Policy-Report-Onlymode 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-playwrightno-wait-for-timeout, eslint-plugin-testing-libraryno-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'sawait expect(locator).toBeVisible()or Testing Library'sfindByqueries. (specific/web) Automatable: eslint-plugin-playwrightno-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: Vitestsequence.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: PlaywrightfailOnFlakyTests. -
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/cssuse-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 mockingfetchor your API client modules, and make requests without a handler fail the test. (specific/web) Automatable: Mock Service WorkeronUnhandledFrame.
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)