Skip to content

BUILD #5: CSS layout linting rules for a11y and modern practices#68

Draft
nujovich wants to merge 5 commits into
mainfrom
hermes/build/mint-pain-points-css-layout
Draft

BUILD #5: CSS layout linting rules for a11y and modern practices#68
nujovich wants to merge 5 commits into
mainfrom
hermes/build/mint-pain-points-css-layout

Conversation

@nujovich

@nujovich nujovich commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Card: https://github.com/nujovich/mint-radar/issues/5

Milestones

  • Milestone 1 -- Layout ordering accessibility rules: detect flex/grid order that breaks DOM order, and visual reordering without tabindex fallback
  • Milestone 2 -- Modern CSS best practice rules: detect grid misuse (single-column grids), legacy centering techniques, min-width:0 hacks, and fragile nested selectors
  • Milestone 3 -- Modern feature adoption suggestions: detect opportunities to use @layer and @container queries
  • Milestone 4 -- Overflow and wrap safety rules: detect missing overflow handling in grid/flex containers and flex containers without flex-wrap

nujovich added 2 commits June 15, 2026 15:33
- 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 nujovich left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. [blocker] CI is failing. The ci check is red — investigate the failure before merging.
  2. [major] layoutA11yIssues added to AuditReport without export-generator updates. The 11 export formats read from AuditReport and 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.

Comment thread lib/types.ts
@@ -86,6 +94,7 @@ export interface AuditReport {
fonts: FontEntry[]

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Comment thread BUILD-PLAN-issue-5.md
Based on pain points from Patrick Brosset's analysis and State of CSS 2025 data.

## Milestones

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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
Hermes BUILD added 2 commits June 17, 2026 22:54
- 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
@nujovich

nujovich commented Jul 7, 2026

Copy link
Copy Markdown
Owner Author

All milestones complete. Ready for review when you are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants