Skip to content

Coding Checklist ​

These items check the rules of the Coding Guidelines.

Not in the Check Sheet yet

This checklist cannot be judged in the Check Sheet or exported to the record sheet (Excel).

Checklist Items ​

Checklist items
IDStrengthItemHow to check
CD-01MUST
Related: CD-R01
Core content and main navigation work with JavaScript disabledDisable JavaScript in DevTools, reload, and confirm the body text and global navigation display and navigate
CD-02MUST
Related: CD-R02
File and directory names use only lowercase letters, digits and hyphensList every file and directory name (excluding node_modules) and confirm none contains a character other than lowercase letters, digits, hyphens, periods and underscores
CD-03MUST
Related: CD-R03, CD-R20
JavaScript selects elements by data-* attributes, never by styling classesSearch the source for querySelector and querySelectorAll and confirm none selects an element by class name
CD-04MUST
Related: CD-R04
State classes are always combined with their component classUse stylelint selector-disallowed-list to forbid selectors made of only a class starting with is- or has-; no violations
CD-05SHOULD
Related: CD-R05
Dynamic state is expressed with data-* attributesSearch the source for class selectors starting with is- or has- and confirm there are none
CD-06SHOULD
Related: CD-R06
Spacing and position use logical propertiesAdd physical properties such as margin-left, padding-top and left to stylelint property-disallowed-list; no violations
CD-07MUST
Related: CD-R07
Every animation or transition stops or is reduced under prefers-reduced-motion: reduceSearch the source for animation and transition, and confirm every matching file contains prefers-reduced-motion; emulate reduce in DevTools Rendering and confirm motion stops
CD-08MUST
Related: CD-R08
Component roots set no outer margin, absolute position or grid placementAI review: check that block root selectors have no margin, inset, grid-area or grid-column
CD-09MUST
Related: CD-R09
No ID selectors; !important appears only in the utilities layerstylelint selector-max-id (set to allow no ID selectors) and declaration-no-important (excluding utilities layer files) report no violations
CD-10MUST
Related: CD-R10
Every color variable is defined in the default :rootCollect every declaration of a variable starting with --color- in the source and confirm each name is declared in the :root block
CD-11MUST
Related: CD-R11
color-scheme is declaredSearch the source for color-scheme and confirm at least one declaration on :root
CD-12SHOULD
Related: CD-R12
No JavaScript reimplements what standard HTML/CSS provides (disclosure, dialog, smooth scroll, etc.)AI review: look for code replaceable by <details>, <dialog>, scroll-behavior and similar
CD-13MUST
Related: CD-R13
Comparisons use === / !==ESLint eqeqeq reports no violations
CD-14MUST
Related: CD-R14
Initialization functions return early when the target element is missingAI review: confirm each init function starts with a guard that returns when the target element is missing
CD-15MUST NOT
Related: CD-R15
No global variables are createdESLint no-implicit-globals and no-undef report no violations
CD-16MUST NOT
Related: CD-R16
var is not usedESLint no-var reports no violations
CD-17MUST NOT
Related: CD-R17
New projects include no jQuery or other legacy librariesSearch package.json and the HTML files for jQuery and confirm there are no hits
CD-18SHOULD
Related: CD-R18
Scripts are loaded with <script type="module">Search the HTML for script elements and confirm every external script has type="module"
CD-19SHOULD
Related: CD-R19
Variables that are never reassigned are declared with constESLint prefer-const reports no violations
CD-20SHOULD
Related: CD-R21
Each module handles one feature and exports an init function that takes the root elementAI review: confirm each module exports a single-feature init function
CD-21SHOULD
Related: CD-R22
Show/hide uses the hidden attribute or a state attributeSearch the source for style.display and confirm there are no hits
CD-22MUST
Related: CD-R23
Custom components support keyboard operation, focus management and ARIA statesFollowing the pattern in Custom UI, operate with the keyboard only and confirm ARIA states change in the DevTools Accessibility panel
CD-23MUST
Related: CD-R24
scroll and resize handlers are debounced or throttledSearch the source for addEventListener calls on scroll and resize, and check by AI review that each one is debounced or throttled
CD-24MUST
Related: CD-R25
Listeners added to window or document are removed on teardownSearch the source for addEventListener on window and document, and confirm each has a matching removeEventListener or AbortController
CD-25MUST NOT
Related: CD-R26
No render-blocking scripts in <head>Search the HTML for script elements with src and confirm none lacks type="module", defer and async
CD-26SHOULD
Related: CD-R27
Position and size are watched with IntersectionObserver / ResizeObserverSearch the source for getBoundingClientRect, offsetTop and scrollY, and confirm none is inside a scroll or resize handler
CD-27SHOULD
Related: CD-R28
DOM reads are batched before writesAI review: look for loops alternating reads such as offsetWidth / getBoundingClientRect() with style writes; DevTools Performance shows no "Forced reflow" warning
CD-28MUST
Related: CD-R29
fetch is wrapped in try...catch and failures are shown to usersSearch the source for fetch calls, and check by AI review that each has catch, a response.ok check and an on-screen message
CD-29MUST
Related: CD-R30
Untrusted data is inserted with textContentSearch the source for innerHTML, outerHTML and insertAdjacentHTML, and confirm each value is a constant or sanitized
CD-30MUST NOT
Related: CD-R31
No API secret keys or auth tokens in codesecretlint or gitleaks reports nothing
CD-31MUST NOT
Related: CD-R32
No document.write(), eval() or HTML on* attributesESLint no-eval and no-implied-eval report nothing, and a search of the JS and HTML for document.write and attributes starting with on (such as onclick) finds nothing
CD-32MUST NOT
Related: CD-R33
No alert(), confirm() or prompt()ESLint no-alert reports no violations
CD-33MUST NOT
Related: CD-R34
No branching on the User-Agent stringSearch the source for userAgent and confirm there are no hits
CD-34MUST NOT
Related: CD-R35
No console.log() or debugger in production codeESLint no-console and no-debugger report no violations
CD-35MUST
Related: CD-R36
Every <img> and art-direction <source> has width and heightLighthouse does not report "Image elements do not have explicit width and height"
CD-36SHOULD
Related: CD-R37
Every srcset has a sizes matching the rendered widthSearch the HTML for srcset and confirm each has sizes; Lighthouse does not report "Properly size images"
CD-37MUST
Related: CD-R38
Offscreen images have loading="lazy"In the DevTools Elements panel, confirm every image outside the viewport has loading="lazy"
CD-38MUST NOT
Related: CD-R39
Above-the-fold images do not have loading="lazy"In the DevTools Elements panel, confirm no image within the first viewport has loading="lazy"; Lighthouse does not report "Largest Contentful Paint image was lazily loaded"