Commit a2291dd
authored
fix(svg): add accessible title and desc tags (JhaSourav07#116)
Fixes JhaSourav07#70
## Summary
Added semantic `<title>` and `<desc>` tags inside generated SVGs to
improve accessibility for screen readers.
## Changes Made
* Added `role="img"` to SVG elements
* Added dynamic `<title>` tags
* Added dynamic `<desc>` tags using contribution stats
* Updated both standard and auto-theme SVG generators
## Pillar
* [ ] 🎨 Pillar 1 — New Theme Design
* [ ] 📐 Pillar 2 — Geometric SVG Improvement
* [ ] 🕐 Pillar 3 — Timezone Logic Optimization
* [x] 🛠️ Other (Bug fix, refactoring, docs)
## Visual Preview
N/A — accessibility-focused update with no visual rendering changes.
## Checklist before requesting a review:
* [x] I have read the `CONTRIBUTING.md` file.
* [ ] I have tested these changes locally
(`localhost:3000/api/streak?user=YOUR_USERNAME`).
* [ ] I have run `npm run format` and `npm run lint` locally and
resolved all errors (CI will fail otherwise).
* [x] My commits follow the Conventional Commits format (e.g.,
`feat(themes): ...`, `fix(calculate): ...`).
* [ ] I have updated `README.md` if I added a new theme or URL
parameter.
* [x] I have started the repo.
* [x] I have made sure that i have only one commit to merge in this PR.
* [x] The SVG output matches the CommitPulse "premium quality" aesthetic
standard (no raw elements, smooth animations, correct fonts).
## Result
Screen readers can now interpret contribution statistics without
affecting visual rendering.1 file changed
Lines changed: 36 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
| |||
148 | 155 | | |
149 | 156 | | |
150 | 157 | | |
| 158 | + | |
151 | 159 | | |
152 | 160 | | |
153 | 161 | | |
| |||
216 | 224 | | |
217 | 225 | | |
218 | 226 | | |
219 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
220 | 239 | | |
221 | 240 | | |
222 | 241 | | |
| |||
287 | 306 | | |
288 | 307 | | |
289 | 308 | | |
290 | | - | |
| 309 | + | |
291 | 310 | | |
292 | 311 | | |
293 | 312 | | |
| |||
313 | 332 | | |
314 | 333 | | |
315 | 334 | | |
| 335 | + | |
316 | 336 | | |
317 | 337 | | |
318 | 338 | | |
| |||
363 | 383 | | |
364 | 384 | | |
365 | 385 | | |
366 | | - | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
367 | 398 | | |
368 | 399 | | |
369 | 400 | | |
| |||
455 | 486 | | |
456 | 487 | | |
457 | 488 | | |
458 | | - | |
| 489 | + | |
459 | 490 | | |
460 | 491 | | |
461 | 492 | | |
| |||
0 commit comments