Skip to content

Fix empty accessibility element cards#65

Merged
aguspe merged 1 commit intomainfrom
fix/a11y-card-parsing
Mar 15, 2026
Merged

Fix empty accessibility element cards#65
aguspe merged 1 commit intomainfrom
fix/a11y-card-parsing

Conversation

@aguspe
Copy link
Copy Markdown
Contributor

@aguspe aguspe commented Mar 15, 2026

Summary

  • Fix node parsing regexes to handle end-of-string (not just newlines) — the last element in each violation block had no trailing newline, causing empty cards
  • Support "Fix all of the following:" in addition to "Fix any of the following:" format
  • Fall back to grabbing the indented description line after HTML when no explicit "Fix" block exists
  • Filter out empty nodes so blank cards never render

Test plan

  • All 577 unit tests pass
  • TypeScript typecheck passes
  • Verify all 3 elements in color-contrast violation now show selector and description
  • Verify heading-order violation elements display correctly

🤖 Generated with Claude Code

@aguspe aguspe merged commit 840375b into main Mar 15, 2026
2 checks passed
@aguspe aguspe mentioned this pull request Mar 15, 2026
aguspe added a commit that referenced this pull request Mar 29, 2026
Fix empty accessibility element cards
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.

1 participant