Rule handbook metadata
- Rule
DET.BUTTON.GROUP.MAX· lanedeterministic- Page status
- current
- page_version
50cb5164f8d3346edc5604d7ef0d000c38f94148be150fcdf0d962ccf3706b46- generated_at
- 2026-05-19T20:15:00.000Z
- registry_fingerprint
2ce40848effce579d3e4879f6ca85535183a14db201870a6c007da424624550c
How this rule is fixed
Pilot deterministic fixer: handbook_after · harness mode standalone · verify expect_rule_clean.
- Harness:
apply-harness-fixture-remediation.pycopies the After example HTML from this handbook page onto the defect fixture, theninvoke-det-ruleset-remediation-verify.shre-audits and expects zero findings for this rule. - Production sites:
run-website-ux-remediation-loop.shrunshandbook_html_patch(HTML patches inlib/ux-deterministic-fixers/fixers/patches/) before invoking the Cursor agent when the quality gate still fails.
Detection module: docs/design/ux-audit/deterministic-design-rules.md#det-button-group-max. Scroll down for Before / After examples and Evidence and remediation steps.
Purpose
Kitchen Sink landing and product heroes render conversion actions in landing-hero-actions with a landing-hero-actions__buttons flex row (components/components.py, css/forgesdlc-theme.css). When four or five filled buttons sit side by side, scanners cannot pick a primary path and touch targets crowd on mobile.
This deterministic rule counts visible horizontal action controls—<button>, input[type=button|submit|reset], [role="button"], and <a class="btn …">—inside known group containers (.landing-hero-actions, .btn-group, .btn-toolbar, [class*="hero-actions"], [class*="cta-row"], [role="group"], and flex-row clusters in main). The default cap is three (MAX_VISIBLE_HORIZONTAL_ACTIONS). Navigation, pagination, tab lists, dropdown menus, and cookie banners are excluded.
Plan: Inventory first-screen horizontal button rows on landing and product pages. Do: Keep one btn btn-forge primary and one btn-cyan-outline secondary; demote extras to landing-hero-secondary-link text links or a "More" disclosure. Check: Run the auditor metrics phase or confirm buttonGroupMaxReport has no violations. Adjust: When marketing keeps adding CTAs, move depth links below the fold instead of widening the hero row.
Passing signals
landing-hero-actions__buttonscontains ≤ 3 visible horizontal actions (typical pattern:btn btn-forge+btn btn-cyan-outline, optional low-emphasisbtn btn-forge-outline).- Additional destinations use
landing-hero-secondary-linkswithlanding-hero-secondary-linkanchors (not counted as button actions). - Toolbar-style clusters use Bootstrap
.btn-group/.btn-toolbarwith at most three visible controls, or overflow behind a single menu trigger. - Flex-row action rows in
main(.d-flex,.flex-row,[class*="flex-row"]) respect the same cap when actions align on one horizontal baseline. - Violation severity stays absent in
metrics.buttonGroupMaxReport(groupCount: 0).
Failing signals
landing-hero-actions__buttonsshows four or more sibling.btnlinks or buttons on one horizontal line (auditor reportsvisible_actions=4or higher, major; critical when count exceedsmaxAllowed + 1).- Product or marketing heroes stack multiple filled primaries (
btn-forge,btn-warning,btn-success) with no demotion to outline or text links. - Custom
[class*="cta-row"]or[class*="__actions"]wrappers repeat the same overcrowding outside the landing helper. - Evidence strings include
group=".landing-hero-actions__buttons"orselectorHintpointing at a flex container withlabels="Start | Docs | API | Pricing | …". - Page passes
DET.CTA.HIERARCHY(one primary class) yet still fails this rule because count, not class role, is the gate.
Before example
Before (failing example)
Governed human + agent delivery
One methodology spine from intent to evidence.
Failing KS markup: five horizontal .btn actions in the canonical hero actions row—exceeds the cap of three.
After example
After (passing example)
Governed human + agent delivery
One methodology spine from intent to evidence.
Passing KS markup: two button actions plus muted secondary links—same destinations, within the horizontal action budget.
Evidence and remediation
Evidence: Auditor field metrics.buttonGroupMaxReport with maxAllowed: 3 and violations[] entries (kind: too-many-actions, actionCount, selectorHint, labels). Findings cite visible_actions=N max=3 and the offending group class. Reproduce in DevTools by selecting .landing-hero-actions__buttons and counting visible .btn / button siblings on one row.
Remediate (in order):
- Collapse the hero row to one
btn-forgeprimary and onebtn-cyan-outline(orbtn-forge-outline) secondary; add a third button only when it is clearly low-emphasis. - Move pricing, trust, demo, and docs paths into
landing-hero-secondary-linksor a follow-onforge-sectionband. - For toolbars, use a single "More" / dropdown trigger instead of a fourth visible
.btnin.btn-group. - Reconcile with
DET.CTA.HIERARCHYso one primary class remains dominant after count reduction. - Re-run
analyze-website-ux.mjsmetrics on hero URLs; align homepage budgets withDET.CONTEXT.BURDEN(hero-fold interactive controls ≤ 3).