Skip to content

Commit 000bd17

Browse files
committed
✨(frontend) improve accessibility of search modal for screen readers
added clearer sr-only translations and aria-hidden for non-essential content Signed-off-by: Cyril <[email protected]>
1 parent 409e073 commit 000bd17

File tree

5 files changed

+29
-5
lines changed

5 files changed

+29
-5
lines changed

src/frontend/apps/impress/src/components/quick-search/QuickSearchInput.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ export const QuickSearchInput = ({
4646
$gap={spacingsTokens['2xs']}
4747
$padding={{ horizontal: 'base', vertical: 'sm' }}
4848
>
49-
{!loading && <Icon iconName="search" $variation="600" />}
49+
{!loading && (
50+
<Icon iconName="search" $variation="600" aria-hidden="true" />
51+
)}
5052
{loading && (
5153
<div>
5254
<Loader size="small" />

src/frontend/apps/impress/src/features/docs/doc-editor/components/DocEditor.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,11 @@ export const DocVersionEditor = ({
119119
causes={error.cause}
120120
icon={
121121
error.status === 502 ? (
122-
<Text className="material-icons" $theme="danger">
122+
<Text
123+
className="material-icons"
124+
$theme="danger"
125+
aria-hidden={true}
126+
>
123127
wifi_off
124128
</Text>
125129
) : undefined

src/frontend/apps/impress/src/features/docs/doc-share/components/DocShareModalFooter.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ export const DocShareModalFooter = ({
3939
fullWidth={false}
4040
onClick={copyDocLink}
4141
color="tertiary"
42-
icon={<span className="material-icons">add_link</span>}
42+
icon={
43+
<span className="material-icons" aria-hidden={true}>
44+
add_link
45+
</span>
46+
}
4347
>
4448
{t('Copy link')}
4549
</Button>

src/frontend/apps/impress/src/features/docs/doc-share/components/DocVisibility.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export const DocVisibility = ({ doc }: DocVisibilityProps) => {
129129
$gap={canManage ? spacingsTokens['3xs'] : spacingsTokens['base']}
130130
>
131131
<DropdownMenu
132-
label={t('Visibility')}
132+
label={t('Document visibility')}
133133
arrowCss={css`
134134
color: ${colorsTokens['primary-800']} !important;
135135
`}
@@ -180,7 +180,7 @@ export const DocVisibility = ({ doc }: DocVisibilityProps) => {
180180
)
181181
: undefined
182182
}
183-
label={t('Visibility mode')}
183+
label={t('Document access mode')}
184184
>
185185
<Text $weight="initial" $variation="600">
186186
{linkModeTranslations[docLinkRole]}

src/frontend/apps/impress/src/i18n/translations.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@
151151
"Version restored successfully": "Stumm assavet gant berzh",
152152
"Visibility": "Gwelusted",
153153
"Visibility mode": "Mod gwelusted",
154+
"Document visibility": "Gwelusted an teul",
155+
"Document access mode": "Mod aotreet an teul",
154156
"Warning": "Diwallit",
155157
"Why you can't edit the document?": "Perak ne c'hellit ket aozañ ar restr?",
156158
"Write": "Skrivañ"
@@ -350,6 +352,8 @@
350352
"Version restored successfully": "Version erfolgreich wiederhergestellt",
351353
"Visibility": "Sichtbarkeit",
352354
"Visibility mode": "Sichtbarkeitseinstellungen",
355+
"Document visibility": "Dokumentensichtbarkeit",
356+
"Document access mode": "Dokumentenzugriffsmodus",
353357
"Warning": "Warnung",
354358
"Why you can't edit the document?": "Warum können Sie dieses Dokument nicht bearbeiten?",
355359
"Write": "Schreiben",
@@ -545,6 +549,8 @@
545549
"Version restored successfully": "Versión restaurada con éxito",
546550
"Visibility": "Visibilidad",
547551
"Visibility mode": "Modo de visibilidad",
552+
"Document visibility": "Visibilidad del documento",
553+
"Document access mode": "Modo de acceso al documento",
548554
"Warning": "Aviso",
549555
"Write": "Escribe",
550556
"You are the sole owner of this group, make another member the group owner before you can change your own role or be removed from your document.": "Eres el único propietario de este grupo, haz que otro miembro sea el propietario del grupo para poder cambiar tu propio rol o ser eliminado del documento.",
@@ -771,6 +777,8 @@
771777
"Version restored successfully": "Version restaurée avec succès",
772778
"Visibility": "Visibilité",
773779
"Visibility mode": "Mode de visibilité",
780+
"Document visibility": "Visibilité du document",
781+
"Document access mode": "Mode d'accès au document",
774782
"Warning": "Attention",
775783
"Why you can't edit the document?": "Pourquoi vous ne pouvez pas modifier le document ?",
776784
"Write": "Écrire",
@@ -930,6 +938,8 @@
930938
"Version restored successfully": "Revisione ripristinata correttamente",
931939
"Visibility": "Visibilità",
932940
"Visibility mode": "Modalità visibilità",
941+
"Document visibility": "Visibilità del documento",
942+
"Document access mode": "Modalità di accesso al documento",
933943
"Warning": "Attenzione",
934944
"Write": "Scrivi",
935945
"You are the sole owner of this group, make another member the group owner before you can change your own role or be removed from your document.": "Sei l'unico proprietario di questo gruppo, devi nominare proprietario un altro membro del gruppo prima di poter cambiare il proprio ruolo o di essere rimosso dal documento.",
@@ -1101,6 +1111,8 @@
11011111
"Version restored successfully": "Versie teruggezet",
11021112
"Visibility": "Zichtbaarheid",
11031113
"Visibility mode": "Zichtbaarheid modus",
1114+
"Document visibility": "Document zichtbaarheid",
1115+
"Document access mode": "Document toegangsmodus",
11041116
"Warning": "Waarschuwing",
11051117
"Write": "Schrijf",
11061118
"You are the sole owner of this group, make another member the group owner before you can change your own role or be removed from your document.": "U bent de enige eigenaar van deze groep, maak een ander lid de groepseigenaar voordat u uw eigen rol kunt wijzigen of kan worden verwijderd van het document.",
@@ -1388,6 +1400,8 @@
13881400
"Version restored successfully": "已成功还原版本",
13891401
"Visibility": "可见性",
13901402
"Visibility mode": "可见模式",
1403+
"Document visibility": "文档可见性",
1404+
"Document access mode": "文档访问模式",
13911405
"Warning": "警告",
13921406
"Write": "写入",
13931407
"You are the sole owner of this group, make another member the group owner before you can change your own role or be removed from your document.": "您是当前群组唯一所有者,需先指定另一管理员,才能更改自身角色或退出文档。",

0 commit comments

Comments
 (0)