Skip to content

Commit

Permalink
Make flip words button act as checkbox
Browse files Browse the repository at this point in the history
Now screen readers should be able to distinguish when it is activated
or not.
  • Loading branch information
ZEBAS204 committed Mar 28, 2023
1 parent ce51b6b commit 0cd1f91
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/settings/Interface.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,15 @@ const Interface = ({
</Stack>

<IconButton
role="checkbox"
size="lg"
rounded="full"
variant="solid"
icon={<FlipIcon />}
title={t('settings.language_word_flip')}
aria-label={t('settings.language_word_flip')}
aria-checked={isWordDisplayFlip}
colorScheme={isWordDisplayFlip ? 'green' : 'red'}
onClick={() => toggleWordFlip()}
title={t('settings.language_word_flip')}
/>

<Stack as="label" mt={0} direction="column">
Expand Down

0 comments on commit 0cd1f91

Please sign in to comment.