️(frontend) announce Escape close hint on side panels

Show "(Escape)" in close tooltip, add aria-describedby for SR keyboard shortcut hint.
This commit is contained in:
Cyril
2026-07-13 14:58:00 +02:00
parent 72af826402
commit f4fed231b8
5 changed files with 16 additions and 4 deletions
@@ -17,6 +17,7 @@ import { HStack } from '@/styled-system/jsx'
import { useReactionsToolbar } from '@/features/reactions/hooks/useReactionsToolbar'
import { useRestoreFocus } from '@/hooks/useRestoreFocus'
import { useEscapeToClose } from '@/hooks/useEscapeToClose'
import { srOnly } from '@/styles/a11y'
type StyledSidePanelProps = {
title: string
@@ -25,6 +26,7 @@ type StyledSidePanelProps = {
onClose: () => void
isClosed: boolean
closeButtonTooltip: string
escapeHint: string
isSubmenu: boolean
onBack: () => void
backButtonLabel: string
@@ -41,6 +43,7 @@ const StyledSidePanel = React.forwardRef<HTMLElement, StyledSidePanelProps>(
isClosed,
isReactionToolbarOpen,
closeButtonTooltip,
escapeHint,
isSubmenu = false,
onBack,
backButtonLabel,
@@ -85,7 +88,11 @@ const StyledSidePanel = React.forwardRef<HTMLElement, StyledSidePanelProps>(
}}
aria-hidden={isClosed}
aria-label={ariaLabel}
aria-describedby="side-panel-escape-hint"
>
<span id="side-panel-escape-hint" className={srOnly}>
{escapeHint}
</span>
<HStack alignItems="center">
{isSubmenu && (
<Button
@@ -211,6 +218,7 @@ export const SidePanel = () => {
closeButtonTooltip={t('closeButton', {
content: t(`content.${activeSubPanelId || activePanelId}`),
})}
escapeHint={t('escapeHint')}
isClosed={!isSidePanelOpen}
isSubmenu={isSubPanelOpen}
isReactionToolbarOpen={isReactionToolbarOpen}
+2 -1
View File
@@ -361,7 +361,8 @@
"tools": "Weitere Tools",
"info": "Meeting-Informationen"
},
"closeButton": "{{content}} ausblenden"
"closeButton": "{{content}} ausblenden (Escape)",
"escapeHint": "Escape drücken zum Schließen"
},
"chat": {
"disclaimer": "Die Nachrichten sind nur für Teilnehmende zum Zeitpunkt des Sendens sichtbar. Alle Nachrichten werden am Ende des Meetings gelöscht.",
+2 -1
View File
@@ -360,7 +360,8 @@
"tools": "more tools",
"info": "meeting information"
},
"closeButton": "Hide {{content}}"
"closeButton": "Hide {{content}} (Escape)",
"escapeHint": "Press Escape to close"
},
"chat": {
"disclaimer": "The messages are visible to participants only at the time they are sent. All messages are deleted at the end of the call.",
+2 -1
View File
@@ -360,7 +360,8 @@
"tools": "outils de réunion",
"info": "informations sur la réunion"
},
"closeButton": "Masquer {{content}}"
"closeButton": "Masquer {{content}} (Échap)",
"escapeHint": "Appuyez sur Échap pour fermer"
},
"chat": {
"disclaimer": "Les messages sont visibles par les participants uniquement au moment de\nleur envoi. Tous les messages sont supprimés à la fin de l'appel.",
+2 -1
View File
@@ -360,7 +360,8 @@
"tools": "meer tools",
"info": "vergaderinformatie"
},
"closeButton": "Verberg {{content}}"
"closeButton": "Verberg {{content}} (Escape)",
"escapeHint": "Druk op Escape om te sluiten"
},
"chat": {
"disclaimer": "De berichten zijn alleen voor de deelnemers zichtbaar op het moment dat ze worden verzonden. Alle berichten worden verwijderd aan het einde van het gesprek.",