Rule handbook metadata
- Rule
DET.HTML.EMPTY_INLINE· lanedeterministic- Page status
- current
- page_version
dbe79823bbc33762ff1359462db1ad4daa978530a36e767f1a280470a5945241- generated_at
- 2026-05-25T11:30: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-html-empty-inline. Scroll down for Before / After examples and Evidence and remediation steps.
Purpose
Handbook and product pages built with forge-autodoc and Kitchen Sink transforms (components/transforms.py enhance_tables, render_table in components/components.py) often wrap table focus cells or Markdown emphasis in <strong> or <em>. When a generator bug, partial Markdown parse, or placeholder row leaves the wrapper with no trimmed text, the tag still appears in the DOM but announces nothing to screen readers and adds noise to accessibility semantics scans.
This deterministic rule evaluates main#main (or the first main landmark) only. It counts <strong> and <em> elements whose textContent, with whitespace collapsed, is empty. Empty <strong> findings are minor; empty <em> are trivial. Content outside main (header chrome, sidebars) is out of scope.
Plan: Crawl handbook chapters, token grids, and comparison tables inside doc-main. Do: Fix transforms so emphasis tags wrap real labels or omit the tag when there is no focus text. Check: metrics.emptyInlineReport reports zero counts. Adjust: Pair with DET.DATA.TABLE_HEADERS when table structure also lacks scoped headers.
Passing signals
- Every
<strong>/<em>insidemaincontains at least one non-whitespace character (visible text or.sr-onlyhelper text inside the same element). render_tablecells use plain text or populated emphasis—for example<td><strong>Recommended</strong></td>instead of an empty wrapper.- Autodoc / Markdown pipelines that mark a “focus” row emit a word such as “Primary”, “Focus”, or the row label inside
<strong>, not an empty shell left for CSS to style. - Prose in
forge-supportparagraphs uses<strong>visible</strong>for inline emphasis; decorative bolding uses CSS classes on spans, not empty semantic tags. metrics.emptyInlineReport:{ emptyStrongCount: 0, emptyEmCount: 0 }after crawl.- No finding evidence keys
empty_strong_count=orempty_em_count=on audited URLs.
Failing signals
empty_strong_count=N— one or more<strong></strong>(or whitespace-only<strong> </strong>) insidemain(minor).empty_em_count=N— empty<em></em>tags inmain(trivial).- Autodoc table focus column with
<td><strong></strong></td>where the Markdown cell was blank but the transform still opened an emphasis wrapper. - Handbook comparison tables in
.forge-table-wrapbesideforge-supportlede copy that references “marked rows” while the marker cell is an empty<strong>. - Generator regression after editing
enhance_tablesor autodoc post-processors: emphasis tags emitted as placeholders for future content. - Page may still pass
DET.CTA.LABEL_NONEMPTY(buttons named) while failing here—empty inline semantics are independent of CTA naming.
Before example
Before (failing example)
Methodology comparison
Rows marked indicate the recommended delivery focus for agent-assisted teams.
| Methodology | Focus | Iteration |
|---|---|---|
| Scrum | 2-week sprint | |
| Forge | Spark-driven | |
| Kanban | Continuous flow | Ongoing |
Failing KS markup: handbook doc-main with a comparison table whose focus column uses empty <strong> wrappers (typical autodoc table focus-row defect).
After example
After (passing example)
Methodology comparison
Rows marked Recommended indicate the delivery focus for agent-assisted teams.
| Methodology | Focus | Iteration |
|---|---|---|
| Scrum | Recommended | 2-week sprint |
| Forge | Primary path | Spark-driven |
| Kanban | Continuous flow | Ongoing |
Passing KS markup: same table with populated emphasis labels (or plain text when no emphasis is needed).
Evidence and remediation
Evidence: Playwright probe collectEmptyInlineReport (or crawl metric metrics.emptyInlineReport) inside main#main. Finding messages cite empty_strong_count=N, empty_em_count=N, and optional url= suffix. Module: design-rules/deterministic/generated/det-html-empty-inline.check.js.
Remediate (in order):
- Locate empty tags: In DevTools, search
mainforstrong/emwith zero text; common sites are.forge-table-wrapfocus columns and autodoc-generated comparison matrices. - Fix generators: Update autodoc or
enhance_tablestransforms so emphasis wrappers are omitted when cell text is blank, or inject the focus label (for example “Recommended”, “Primary”) from Markdown metadata. - Fix hand-authored HTML: Replace
<strong></strong>with visible copy or remove the tag; useforge-support+ CSS weight classes when semantics are decorative only. - Optional regions: Align with
DET.PY.OPTIONAL_REGIONS—do not emit placeholder emphasis for slots that render empty. - Re-verify: Run
analyze-website-ux.mjson affected handbook routes; confirmemptyInlineReportcounts are zero. For ruleset harness:generator/build_rule_defect_fixtures.pyandauditor-tests/invoke-det-ruleset-harness.sh --only-rule DET.HTML.EMPTY_INLINE.