# SLDS Quality Checks Reference Complete catalog of quality checks performed during SLDS component validation. > **Scope note:** The SLDS linter already catches class overrides (`slds/class-override`), deprecated tokens (`slds/lwc-token-to-slds-hook`), and hardcoded values (`slds/no-hardcoded-values`). The checks below cover what the linter does **not** catch. Linter violation counts are incorporated into the final score separately — see Step 1 in SKILL.md. ### Detection Legend | Symbol | Meaning | |--------|---------| | **Script** | Automated by `analyze-quality.cjs` | | **Linter** | Caught by the SLDS linter | | **Manual** | Requires agent review (Step 3) | --- ## Table of Contents - [Theming and Styling Checks](#theming-and-styling-checks) - [Accessibility Checks](#accessibility-checks) - [Code Quality Checks](#code-quality-checks) - [Component Usage Checks](#component-usage-checks) - [Detection Patterns](#detection-patterns) --- ## Theming and Styling Checks ### Hook Fallbacks (not caught by linter) | ID | Check | Severity | Detection | Pass Criteria | |----|-------|----------|-----------|---------------| | T002 | Fallback values present | Critical | Script | All `var(--slds-g-*)` include a fallback value | ### Hook Family Pairing | ID | Check | Severity | Detection | Pass Criteria | |----|-------|----------|-----------|---------------| | T010 | File-level hook family pairing | Warning | Script | Each background hook family present in a file has a matching `on-*` family present somewhere in the same file | | T011 | Surface/container pairing correctness | Warning | Manual | `surface-*` and `surface-container-*` backgrounds are paired with appropriate `on-surface-*` text in the same selector/context | | T012 | Accent pairing correctness | Warning | Manual | `accent-*` and `accent-container-*` backgrounds are paired with appropriate `on-accent-*` text in the same selector/context | | T013 | Feedback pairing correctness | Warning | Manual | Feedback colors are paired with the correct `on-error-*`, `on-warning-*`, `on-success-*`, or `on-info-*` text hooks in the same selector/context | ### Spacing Hook Usage | ID | Check | Severity | Detection | Pass Criteria | |----|-------|----------|-----------|---------------| | T020 | Spacing uses hooks | Warning | Manual | Spacing uses `var(--slds-g-spacing-*)` or utilities | | T021 | No magic pixel values | Warning | Script | No arbitrary `px` values for spacing | | T022 | Base-8 alignment | Info | Manual | Spacing values align to 4, 8, 12, 16, 24, 32, 48px | ### Typography Hook Usage | ID | Check | Severity | Detection | Pass Criteria | |----|-------|----------|-----------|---------------| | T030 | Font family hooks | Warning | Manual | `font-family` uses `var(--slds-g-font-family-*)` | | T031 | Font size hooks | Warning | Manual | `font-size` uses `var(--slds-g-font-scale-*)` or `var(--slds-g-font-size-base)` — NOT `var(--slds-g-font-size-N)` | | T032 | Font weight hooks | Warning | Manual | `font-weight` uses `var(--slds-g-font-weight-*)` | | T033 | Line height hooks | Info | Manual | `line-height` uses `var(--slds-g-font-line-height-*)` | ### Other Styling Hooks | ID | Check | Severity | Detection | Pass Criteria | |----|-------|----------|-----------|---------------| | T040 | Shadow hooks | Warning | Manual | Shadows use `var(--slds-g-shadow-*)` | | T041 | Border radius hooks | Warning | Manual | Border radius uses `var(--slds-g-radius-*)` | | T042 | Border width hooks | Info | Manual | Border width uses `var(--slds-g-border-width-*)` | ### Hook Validity | ID | Check | Severity | Detection | Pass Criteria | |----|-------|----------|-----------|---------------| | T050 | Color hooks numbered | Warning | Manual | Every `--slds-g-color-*` hook ends in a number (no bare `on-surface`, `on-accent`, etc.) | | T051 | No invented hooks | Critical | Script | Every `--slds-g-*` hook referenced actually exists in `metadata/hooks-index.json` | --- ## Accessibility Checks ### Labels and Names | ID | Check | Severity | Detection | Pass Criteria | |----|-------|----------|-----------|---------------| | A001 | Input labels | Critical | Script | All `` have `label` attribute | | A002 | Button names | Critical | Manual | All `