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

Commit e81286a

Browse files
[gatsby-theme-docz]: add aria-label attribute to theme button (#1383)
1 parent 0ed0153 commit e81286a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • core/gatsby-theme-docz/src/components/Header

core/gatsby-theme-docz/src/components/Header/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ export const Header = props => {
4242
</Box>
4343
)}
4444
{showDarkModeSwitch && (
45-
<button sx={styles.headerButton} onClick={toggleColorMode}>
45+
<button
46+
sx={styles.headerButton}
47+
onClick={toggleColorMode}
48+
aria-label={`Switch to ${colorMode} mode`}
49+
>
4650
<Sun size={15} />
4751
</button>
4852
)}

0 commit comments

Comments
 (0)