From c47e830b407c66d3aedef30b2b8a5d736d1b341a Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Thu, 8 Jan 2026 12:23:25 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F(frontend)=20introduce=20an?= =?UTF-8?q?=20Icon=20primitive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Encapsulate icon and symbol rendering in a dedicated component that applies aria-hidden and disables translation attributes. This prevents browsers from translating icon names and breaking the UI, and ensures screen readers do not announce decorative icons. This is a first draft and can be extended with additional variants later. --- src/frontend/src/App.tsx | 2 + .../recording/components/ControlsButton.tsx | 40 +++++------ .../recording/components/LoginPrompt.tsx | 6 +- .../components/RecordingStatusIcon.tsx | 5 +- .../recording/components/RequestRecording.tsx | 4 +- .../recording/components/RowWrapper.tsx | 3 +- .../rooms/livekit/components/Tools.tsx | 8 +-- .../components/SettingsDialogExtended.tsx | 3 +- src/frontend/src/primitives/Icon.tsx | 71 +++++++++++++++++++ src/frontend/src/primitives/index.ts | 1 + src/frontend/src/styles/icons.css | 27 ------- src/frontend/src/styles/index.css | 1 - 12 files changed, 105 insertions(+), 66 deletions(-) create mode 100644 src/frontend/src/primitives/Icon.tsx delete mode 100644 src/frontend/src/styles/icons.css diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 0a1d3c7e..4bcf5ec8 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -1,3 +1,5 @@ +import '@fontsource/material-icons-outlined' +import '@fontsource-variable/material-symbols-outlined' import '@livekit/components-styles' import '@/styles/index.css' import { Suspense } from 'react' diff --git a/src/frontend/src/features/recording/components/ControlsButton.tsx b/src/frontend/src/features/recording/components/ControlsButton.tsx index 94e72aa9..33694db8 100644 --- a/src/frontend/src/features/recording/components/ControlsButton.tsx +++ b/src/frontend/src/features/recording/components/ControlsButton.tsx @@ -1,7 +1,7 @@ -import { css, cx } from '@/styled-system/css' +import { css } from '@/styled-system/css' import { HStack } from '@/styled-system/jsx' import { Spinner } from '@/primitives/Spinner' -import { Button, Text } from '@/primitives' +import { Button, Icon, Text } from '@/primitives' import { useTranslation } from 'react-i18next' import { RecordingStatuses } from '../hooks/useRecordingStatuses' import { ReactNode, useEffect, useRef, useState } from 'react' @@ -141,31 +141,23 @@ export const ControlsButton = ({ })} onPress={() => openSidePanel()} > - - info - + {parseLineBreaks(t('button.anotherModeStarted'))} - - chevron_right - + )}