From dfa6092c72ce6d46e36b9c764a7ed603e2bce8af Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Fri, 27 Mar 2026 17:31:00 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BF=EF=B8=8F(frontend)=20improve=20access?= =?UTF-8?q?ibility=20of=20the=20reaction=20toolbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an aria-label to clearly describe the purpose of the toolbar. Avoid redundant wording in reaction button labels to improve clarity for screen reader users. --- .../features/reactions/components/ReactionsToggle.tsx | 1 + .../reactions/components/toolbar/ReactionButton.tsx | 3 +-- .../reactions/components/toolbar/ReactionsToolbar.tsx | 9 ++++++++- src/frontend/src/locales/de/rooms.json | 2 +- src/frontend/src/locales/en/rooms.json | 2 +- src/frontend/src/locales/fr/rooms.json | 2 +- src/frontend/src/locales/nl/rooms.json | 2 +- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/frontend/src/features/reactions/components/ReactionsToggle.tsx b/src/frontend/src/features/reactions/components/ReactionsToggle.tsx index 002b7c1b..38d950a3 100644 --- a/src/frontend/src/features/reactions/components/ReactionsToggle.tsx +++ b/src/frontend/src/features/reactions/components/ReactionsToggle.tsx @@ -22,6 +22,7 @@ export const ReactionsToggle = () => { square variant="primaryDark" aria-label={t('button')} + aria-expanded={isOpen} tooltip={t('button')} isSelected={isOpen} onChange={toggle} diff --git a/src/frontend/src/features/reactions/components/toolbar/ReactionButton.tsx b/src/frontend/src/features/reactions/components/toolbar/ReactionButton.tsx index 9664a244..3dd04a96 100644 --- a/src/frontend/src/features/reactions/components/toolbar/ReactionButton.tsx +++ b/src/frontend/src/features/reactions/components/toolbar/ReactionButton.tsx @@ -1,6 +1,5 @@ import { useTranslation } from 'react-i18next' import { css } from '@/styled-system/css' -import { getEmojiLabel } from '../../utils' import { Emoji } from '../../types' import { useReactions } from '../../hooks/useReactions' import { Button } from '@/primitives' @@ -11,7 +10,7 @@ export const ReactionButton = ({ emoji }: { emoji: Emoji }) => { return (