Skip to content

Core: Inject semantic <title> and <desc> into generated SVGs #70

@DamienSable

Description

@DamienSable

📝 Description

When users embed our 3D monolith in their GitHub README, it acts as a single image. Screen readers cannot "see" the 3D bars or read the text embedded inside the SVG paths. This makes the data completely invisible to visually impaired developers.

🎯 What needs to be done

Modify the SVG generator to inject semantic <title> and <desc> tags right after the opening <svg> tag. The description should dynamically include the user's actual stats (Total Commits, Longest Streak) in plain text format.

📍 Where to look

  • lib/svg/generator.ts (Inside the main template string that returns the <svg> tag).

✅ Acceptance Criteria

  • The generated SVG contains a <title> tag (e.g., CommitPulse Stats for jhasourav07).
  • The generated SVG contains a <desc> tag summarizing the stats (e.g., jhasourav07 has 1240 total contributions and a longest streak of 45 days.).
  • Verify that adding these tags does not break the visual rendering of the SVG in major browsers.

Metadata

Metadata

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions