Skip to content

Commit ac5eb79

Browse files
committed
test(svg): verify auto-theme SVG accessibility role
1 parent 6c969f6 commit ac5eb79

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
@@ -266,11 +266,15 @@ describe('generateSVG', () => {
266266

267267
it('includes desc element in auto-theme SVG output', () => {
268268
const svg = generateSVG(mockStats, autoParams, mockCalendar);
269-
270269
expect(svg).toContain('<desc>');
271270
expect(svg).toContain(String(mockStats.totalContributions));
272271
});
273272

273+
it('includes role="img" in auto-theme SVG output', () => {
274+
const svg = generateSVG(mockStats, autoParams, mockCalendar);
275+
expect(svg).toContain('role="img"');
276+
});
277+
274278
it('generates heat particles with CSS class instead of inline fill', () => {
275279
const svg = generateSVG(mockStats, autoParams, mockCalendar);
276280

0 commit comments

Comments
 (0)