Skip to content

Commit 18f4ab8

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 e71c450 commit 18f4ab8

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
@@ -27,6 +27,9 @@ and this project adheres to
2727
- ♿ add default background to left panel for better accessibility #1423
2828
- ♿ restyle checked checkboxes: removing strikethrough #1439
2929
- ♿ add h1 for SR on 40X pages and remove alt texts #1438
30+
- ♿ update labels and shared document icon accessibility #1442
31+
32+
3033
### Fixed
3134

3235
- 🐛(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)