Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit cf5f77e

Browse files
committed
add aria-label to mermaid zoom buttons
1 parent 73fca98 commit cf5f77e

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/components/MermaidZoom.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,24 @@ const MermaidZoom: React.FC<MermaidZoomProps> = (props) => (
1919
{({ zoomIn, zoomOut, resetTransform }) => (
2020
<React.Fragment>
2121
<div className="absolute right-2 top-2 z-10 space-x-1">
22-
<Button variant="outline" size="icon" onClick={() => zoomIn()}>
22+
<Button
23+
aria-label="Zoom In"
24+
variant="outline"
25+
size="icon"
26+
onClick={() => zoomIn()}
27+
>
2328
<MagnifyingGlassPlusIcon className="size-5" />
2429
</Button>
25-
<Button variant="outline" size="icon" onClick={() => zoomOut()}>
30+
<Button
31+
aria-label="Zoom Out"
32+
variant="outline"
33+
size="icon"
34+
onClick={() => zoomOut()}
35+
>
2636
<MagnifyingGlassMinusIcon className="size-5" />
2737
</Button>
2838
<Button
39+
aria-label="Reset Zoom"
2940
variant="outline"
3041
size="icon"
3142
onClick={() => resetTransform()}

0 commit comments

Comments
 (0)