Skip to content

Commit 133535b

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 133535b

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ and this project adheres to
2626
- ♿ improve semantic structure and aria roles of leftpanel #1431
2727
- ♿ add default background to left panel for better accessibility #1423
2828
- ♿ add h1 for SR on 40X pages and remove alt texts #1438
29+
- ♿ update labels and shared document icon accessibility #1442
30+
31+
2932
### Fixed
3033

3134
- 🐛(backend) duplicate sub docs as root for reader users

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)