docs(theme): bump sidebar link min-height to 24px to satisfy a11y/touch-target - #284
Conversation
|
I have everything I need. Here is the structured review. Code review summaryPR: No Rust source files are touched. Determinism, layering, error-handling, and unsafe invariants are out of scope. Blockers
Warnings
Architecture compliance
Anti-pattern scan
Quality assessmentThe fix is minimal and precisely scoped: two files, 26 added lines, zero deleted lines. The motivation is verified (Plumb's own Commit message follows Conventional Commits ( Scope check
Verdict: APPROVE |
…ch-target The docs site at https://plumb.aramhammoudeh.com previously failed Plumb's own `a11y/touch-target` rule (default `min_height_px = 24`) when self-linted: the stock mdBook sidebar produces ~22 px tall chapter anchors on common viewports. Add `docs/theme/css/custom.css` with a min-height + padding bump on `.chapter li a` and wire it via `book.toml`'s `additional-css`. This keeps the sidebar above the 24 px WCAG 2.5.8 floor without touching `theme/head.hbs` (left untouched so it can coexist with parallel theme work in PR 1).
5d1ca69 to
748b9bc
Compare
Summary
docs/theme/css/custom.cssand wires it viabook.toml'sadditional-css.a11y/touch-targetrule (defaultmin_height_px = 24).Why
From the share-readiness audit (finding H33). When
plumb lint https://plumb.aramhammoudeh.comwas run against the deployed docs site, the stock mdBook sidebar tripped Plumb's owna11y/touch-targetrule because chapter anchors render at ~22 px on common viewports — below the 24 px WCAG 2.5.8 floor. Fixing this avoids the embarrassing "linter fails its own docs site" moment.Approach
.chapter li a(the sidebar anchors inside<ol class="chapter">) plus.chapter-itemand.expandedpermutations.min-height: 24pxpluspadding-top: 4px/padding-bottom: 4pxanddisplay: flex; align-items: center;so the touch target is honored even when the line-height alone wouldn't reach 24 px.theme/head.hbsuntouched so it can coexist with parallel theme work (PR 1's version-stamp).Test plan
mdbook buildsucceeds; the hashed CSS (book/docs/theme/css/custom-<hash>.css) is referenced frombook/index.html.just validatepasses on the branch.plumb lint https://plumb.aramhammoudeh.comno longer reportsa11y/touch-targetviolations on the sidebar.