Add type="button" to theme toggle for accessibility compliance

This commit is contained in:
MartinBraquet
2026-04-04 14:37:55 +02:00
parent e2cdfc01cd
commit bdbce67423

View File

@@ -31,7 +31,12 @@ export default function ThemeIcon(props: {className?: string}) {
</>
)
return (
<button onClick={toggleTheme} className={'w-fit'} data-testid="settings-dark-light-toggle">
<button
type={'button'}
onClick={toggleTheme}
className={'w-fit'}
data-testid="settings-dark-light-toggle"
>
<Row className="items-center gap-1 border-2 border-gray-500 rounded-full p-1 w-fit mx-2 px-3 hover:bg-canvas-100">
{icon}
{children}