Skip to content

Commit 5ad44ae

Browse files
committed
✨(frontend) update labels and shared document icon accessibility
remove aria-labels from decorative icons and add sr-only text to shared doc icon Signed-off-by: Cyril <[email protected]>
1 parent 14c84f0 commit 5ad44ae

File tree

1 file changed

+17
-15
lines changed
  • src/frontend/apps/impress/src/features/docs/docs-grid/components

1 file changed

+17
-15
lines changed

src/frontend/apps/impress/src/features/docs/docs-grid/components/DocsGridItem.tsx

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,19 @@ export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
102102
}
103103
>
104104
{dragMode && (
105-
<Icon
106-
$theme="greyscale"
107-
$variation="600"
108-
$size="14px"
109-
iconName={isPublic ? 'public' : 'vpn_lock'}
110-
aria-label={
111-
isPublic
105+
<>
106+
<Icon
107+
$theme="greyscale"
108+
$variation="600"
109+
$size="14px"
110+
iconName={isPublic ? 'public' : 'vpn_lock'}
111+
/>
112+
<span className="sr-only">
113+
{isPublic
112114
? t('Accessible to anyone')
113-
: t('Accessible to authenticated users')
114-
}
115-
/>
115+
: t('Accessible to authenticated users')}
116+
</span>
117+
</>
116118
)}
117119
{!dragMode && (
118120
<Tooltip
@@ -131,12 +133,12 @@ export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
131133
$variation="600"
132134
$size="14px"
133135
iconName={isPublic ? 'public' : 'vpn_lock'}
134-
aria-label={
135-
isPublic
136-
? t('Accessible to anyone')
137-
: t('Accessible to authenticated users')
138-
}
139136
/>
137+
<span className="sr-only">
138+
{isPublic
139+
? t('Accessible to anyone')
140+
: t('Accessible to authenticated users')}
141+
</span>
140142
</div>
141143
</Tooltip>
142144
)}

0 commit comments

Comments
 (0)