(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 <c.gromoff@gmail.com>
This commit is contained in:
Cyril
2025-10-01 11:33:02 +02:00
parent e71c45077d
commit 18f4ab880f
2 changed files with 20 additions and 15 deletions

View File

@@ -27,6 +27,9 @@ and this project adheres to
- ♿ add default background to left panel for better accessibility #1423
- ♿ restyle checked checkboxes: removing strikethrough #1439
- ♿ add h1 for SR on 40X pages and remove alt texts #1438
- ♿ update labels and shared document icon accessibility #1442
### Fixed
- 🐛(backend) duplicate sub docs as root for reader users

View File

@@ -102,17 +102,19 @@ export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
}
>
{dragMode && (
<Icon
$theme="greyscale"
$variation="600"
$size="14px"
iconName={isPublic ? 'public' : 'vpn_lock'}
aria-label={
isPublic
<>
<Icon
$theme="greyscale"
$variation="600"
$size="14px"
iconName={isPublic ? 'public' : 'vpn_lock'}
/>
<span className="sr-only">
{isPublic
? t('Accessible to anyone')
: t('Accessible to authenticated users')
}
/>
: t('Accessible to authenticated users')}
</span>
</>
)}
{!dragMode && (
<Tooltip
@@ -131,12 +133,12 @@ export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
$variation="600"
$size="14px"
iconName={isPublic ? 'public' : 'vpn_lock'}
aria-label={
isPublic
? t('Accessible to anyone')
: t('Accessible to authenticated users')
}
/>
<span className="sr-only">
{isPublic
? t('Accessible to anyone')
: t('Accessible to authenticated users')}
</span>
</div>
</Tooltip>
)}