mirror of
https://github.com/suitenumerique/meet.git
synced 2026-09-02 13:48:26 +00:00
♿(frontend) add wheel zoom shortcut hints to screen share controls
Show Ctrl/Cmd+scroll zoom shortcut in tooltips, aria, SR hints, w/ en/fr/nl/de.
This commit is contained in:
@@ -11,6 +11,8 @@ import {
|
|||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||||
import { useScreenReaderAnnounce } from '@/hooks/useScreenReaderAnnounce'
|
import { useScreenReaderAnnounce } from '@/hooks/useScreenReaderAnnounce'
|
||||||
|
import { isMacintosh } from '@/utils/livekit'
|
||||||
|
import { srOnly } from '@/styles/a11y'
|
||||||
|
|
||||||
interface ScreenShareZoomControlsProps {
|
interface ScreenShareZoomControlsProps {
|
||||||
containerRef: React.RefObject<HTMLDivElement | null>
|
containerRef: React.RefObject<HTMLDivElement | null>
|
||||||
@@ -76,6 +78,11 @@ export const ScreenShareZoomControls = ({
|
|||||||
}
|
}
|
||||||
}, [containerRef])
|
}, [containerRef])
|
||||||
|
|
||||||
|
const wheelShortcutVisual = isMacintosh() ? '⌘+scroll' : 'Ctrl+scroll'
|
||||||
|
const wheelShortcutSR = t(
|
||||||
|
isMacintosh() ? 'wheelShortcutMac' : 'wheelShortcut'
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={css({
|
className={css({
|
||||||
@@ -103,6 +110,9 @@ export const ScreenShareZoomControls = ({
|
|||||||
},
|
},
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
|
<span className={srOnly}>
|
||||||
|
{t(isMacintosh() ? 'wheelShortcutHintMac' : 'wheelShortcutHint')}
|
||||||
|
</span>
|
||||||
{isZoomed && (
|
{isZoomed && (
|
||||||
<>
|
<>
|
||||||
<Button
|
<Button
|
||||||
@@ -119,8 +129,8 @@ export const ScreenShareZoomControls = ({
|
|||||||
size="sm"
|
size="sm"
|
||||||
variant="primaryTextDark"
|
variant="primaryTextDark"
|
||||||
square
|
square
|
||||||
tooltip={t('zoomOut')}
|
tooltip={t('zoomOutWithShortcut', { shortcut: wheelShortcutVisual })}
|
||||||
aria-label={t('zoomOut')}
|
aria-label={t('zoomOutWithShortcut', { shortcut: wheelShortcutSR })}
|
||||||
isDisabled={!canZoomOut}
|
isDisabled={!canZoomOut}
|
||||||
onPress={onZoomOut}
|
onPress={onZoomOut}
|
||||||
>
|
>
|
||||||
@@ -150,8 +160,8 @@ export const ScreenShareZoomControls = ({
|
|||||||
size="sm"
|
size="sm"
|
||||||
variant="primaryTextDark"
|
variant="primaryTextDark"
|
||||||
square
|
square
|
||||||
tooltip={t('zoomIn')}
|
tooltip={t('zoomInWithShortcut', { shortcut: wheelShortcutVisual })}
|
||||||
aria-label={t('zoomIn')}
|
aria-label={t('zoomInWithShortcut', { shortcut: wheelShortcutSR })}
|
||||||
isDisabled={!canZoomIn}
|
isDisabled={!canZoomIn}
|
||||||
onPress={onZoomIn}
|
onPress={onZoomIn}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -671,7 +671,13 @@
|
|||||||
"screenShareZoom": {
|
"screenShareZoom": {
|
||||||
"toolbarLabel": "Zoom-Steuerung für Bildschirmfreigabe",
|
"toolbarLabel": "Zoom-Steuerung für Bildschirmfreigabe",
|
||||||
"zoomIn": "Vergrößern",
|
"zoomIn": "Vergrößern",
|
||||||
|
"zoomInWithShortcut": "Vergrößern ({{shortcut}})",
|
||||||
"zoomOut": "Verkleinern",
|
"zoomOut": "Verkleinern",
|
||||||
|
"zoomOutWithShortcut": "Verkleinern ({{shortcut}})",
|
||||||
|
"wheelShortcut": "Steuerung plus Mausrad",
|
||||||
|
"wheelShortcutMac": "Befehl plus Mausrad",
|
||||||
|
"wheelShortcutHint": "Tastenkürzel: Steuerung plus Mausrad zum Vergrößern oder Verkleinern.",
|
||||||
|
"wheelShortcutHintMac": "Tastenkürzel: Befehl plus Mausrad zum Vergrößern oder Verkleinern.",
|
||||||
"fitToWindow": "An Fenster anpassen",
|
"fitToWindow": "An Fenster anpassen",
|
||||||
"fullScreen": "Vollbild",
|
"fullScreen": "Vollbild",
|
||||||
"exitFullScreen": "Vollbild beenden",
|
"exitFullScreen": "Vollbild beenden",
|
||||||
|
|||||||
@@ -670,7 +670,13 @@
|
|||||||
"screenShareZoom": {
|
"screenShareZoom": {
|
||||||
"toolbarLabel": "Screen share zoom controls",
|
"toolbarLabel": "Screen share zoom controls",
|
||||||
"zoomIn": "Zoom in",
|
"zoomIn": "Zoom in",
|
||||||
|
"zoomInWithShortcut": "Zoom in ({{shortcut}})",
|
||||||
"zoomOut": "Zoom out",
|
"zoomOut": "Zoom out",
|
||||||
|
"zoomOutWithShortcut": "Zoom out ({{shortcut}})",
|
||||||
|
"wheelShortcut": "Control plus scroll wheel",
|
||||||
|
"wheelShortcutMac": "Command plus scroll wheel",
|
||||||
|
"wheelShortcutHint": "Shortcut: Control plus scroll wheel to zoom in or out.",
|
||||||
|
"wheelShortcutHintMac": "Shortcut: Command plus scroll wheel to zoom in or out.",
|
||||||
"fitToWindow": "Fit to window",
|
"fitToWindow": "Fit to window",
|
||||||
"fullScreen": "Full screen",
|
"fullScreen": "Full screen",
|
||||||
"exitFullScreen": "Exit full screen",
|
"exitFullScreen": "Exit full screen",
|
||||||
|
|||||||
@@ -670,7 +670,13 @@
|
|||||||
"screenShareZoom": {
|
"screenShareZoom": {
|
||||||
"toolbarLabel": "Contrôles de zoom du partage d'écran",
|
"toolbarLabel": "Contrôles de zoom du partage d'écran",
|
||||||
"zoomIn": "Zoomer",
|
"zoomIn": "Zoomer",
|
||||||
|
"zoomInWithShortcut": "Zoomer ({{shortcut}})",
|
||||||
"zoomOut": "Dézoomer",
|
"zoomOut": "Dézoomer",
|
||||||
|
"zoomOutWithShortcut": "Dézoomer ({{shortcut}})",
|
||||||
|
"wheelShortcut": "Contrôle plus molette",
|
||||||
|
"wheelShortcutMac": "Commande plus molette",
|
||||||
|
"wheelShortcutHint": "Raccourci : Contrôle plus molette pour zoomer ou dézoomer.",
|
||||||
|
"wheelShortcutHintMac": "Raccourci : Commande plus molette pour zoomer ou dézoomer.",
|
||||||
"fitToWindow": "Ajuster à la fenêtre",
|
"fitToWindow": "Ajuster à la fenêtre",
|
||||||
"fullScreen": "Plein écran",
|
"fullScreen": "Plein écran",
|
||||||
"exitFullScreen": "Quitter le plein écran",
|
"exitFullScreen": "Quitter le plein écran",
|
||||||
|
|||||||
@@ -670,7 +670,13 @@
|
|||||||
"screenShareZoom": {
|
"screenShareZoom": {
|
||||||
"toolbarLabel": "Zoombediening voor schermdeling",
|
"toolbarLabel": "Zoombediening voor schermdeling",
|
||||||
"zoomIn": "Inzoomen",
|
"zoomIn": "Inzoomen",
|
||||||
|
"zoomInWithShortcut": "Inzoomen ({{shortcut}})",
|
||||||
"zoomOut": "Uitzoomen",
|
"zoomOut": "Uitzoomen",
|
||||||
|
"zoomOutWithShortcut": "Uitzoomen ({{shortcut}})",
|
||||||
|
"wheelShortcut": "Control plus scrollwiel",
|
||||||
|
"wheelShortcutMac": "Command plus scrollwiel",
|
||||||
|
"wheelShortcutHint": "Sneltoets: Control plus scrollwiel om in of uit te zoomen.",
|
||||||
|
"wheelShortcutHintMac": "Sneltoets: Command plus scrollwiel om in of uit te zoomen.",
|
||||||
"fitToWindow": "Aanpassen aan venster",
|
"fitToWindow": "Aanpassen aan venster",
|
||||||
"fullScreen": "Volledig scherm",
|
"fullScreen": "Volledig scherm",
|
||||||
"exitFullScreen": "Volledig scherm verlaten",
|
"exitFullScreen": "Volledig scherm verlaten",
|
||||||
|
|||||||
Reference in New Issue
Block a user