Skip to content

Commit 7f83457

Browse files
authored
test(svg): verify auto-theme SVG accessibility role (JhaSourav07#787)
2 parents 92ef1bc + ac5eb79 commit 7f83457

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/svg/generator.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,15 @@ describe('generateSVG', () => {
290290

291291
it('includes desc element in auto-theme SVG output', () => {
292292
const svg = generateSVG(mockStats, autoParams, mockCalendar);
293-
294293
expect(svg).toContain('<desc>');
295294
expect(svg).toContain(String(mockStats.totalContributions));
296295
});
297296

297+
it('includes role="img" in auto-theme SVG output', () => {
298+
const svg = generateSVG(mockStats, autoParams, mockCalendar);
299+
expect(svg).toContain('role="img"');
300+
});
301+
298302
it('generates heat particles with CSS class instead of inline fill', () => {
299303
const svg = generateSVG(mockStats, autoParams, mockCalendar);
300304

0 commit comments

Comments
 (0)