BUILD #5: CSS layout linting rules for a11y and modern practices#68
BUILD #5: CSS layout linting rules for a11y and modern practices#68nujovich wants to merge 5 commits into
Conversation
- Add LayoutA11yIssue interface and extend AuditReport type - Add STEP 8 to audit prompt: detect order breaking DOM order and visual reordering without tabindex fallback - Add layout a11y contribution to chaos score (+1 if >=3 issues) - Add tests for prompt content and audit response handling
nujovich
left a comment
There was a problem hiding this comment.
Automated review (harness)
Adds Step 8 (Layout Accessibility) to the CSS audit prompt — detects flex/grid order issues and missing tabindex fallbacks. Milestone 1 of 4 only.
Two issues before merge:
- [blocker] CI is failing. The
cicheck is red — investigate the failure before merging. - [major]
layoutA11yIssuesadded toAuditReportwithout export-generator updates. The 11 export formats read fromAuditReportand may crash or silently misbehave on the new field. Verify at least the tailwind target handles it, or confirm intentional no-op.
Minor: the BUILD-PLAN file shows M1 as [ ] but the PR body marks it [x] — update for consistency.
| @@ -86,6 +94,7 @@ export interface AuditReport { | |||
| fonts: FontEntry[] | |||
There was a problem hiding this comment.
[major] layoutA11yIssues is added to AuditReport but no export format generator is updated. The 11 export targets may crash or produce incomplete output on the new field. Verify at least the primary target (tailwind) handles it, or confirm the field is intentionally ignored by all exporters.
| Based on pain points from Patrick Brosset's analysis and State of CSS 2025 data. | ||
|
|
||
| ## Milestones | ||
|
|
There was a problem hiding this comment.
[minor] Milestone 1 is unchecked [ ] in the plan file but marked [x] in the PR body — update the plan to reflect that M1 is delivered in this PR.
- Add STEP 9 to audit prompt: grid-when-flexbox-wrap-would-work, legacy-centering, flex-min-width-zero-hack, fragile-nested-selectors - Add modernPracticeIssues to output format with suggestion severity - Add 8 new tests covering prompt content and response parsing
- Add STEP 10 to audit prompt for modern feature adoption detection - use-css-layers: detect projects with many rules lacking @layer organization - use-container-queries: detect component-scoped @media queries that could use @container - Both rules use "info" severity (aspirational suggestions) - Add adoptionSuggestions field to JSON output format - Add TypeScript types: AdoptionSuggestion, ModernPracticeIssue - Add tests for prompt construction and audit parsing
- Add STEP 11 (overflow and wrap safety) to buildAuditPrompt - Detect flex containers without flex-wrap (warning) - Detect grid/flex containers without overflow handling (suggestion) - Add OverflowSafetyIssue interface to types.ts - Add chaos score contribution for overflow issues (+1 if >= 4) - Update tests: all 283 passing
|
All milestones complete. Ready for review when you are. |
Card: https://github.com/nujovich/mint-radar/issues/5
Milestones