(frontend) remove redundant aria-label on hidden icons and update tests

remove aria-label from aria-hidden icons and update tests with data-testid

Signed-off-by: Cyril <c.gromoff@gmail.com>
This commit is contained in:
Cyril
2025-09-24 10:23:06 +02:00
parent 8ab21ef00d
commit 1fdf70bdcf
5 changed files with 12 additions and 15 deletions

View File

@@ -1,5 +1,3 @@
import { useTranslation } from 'react-i18next';
import { Text, TextType } from '@/components';
type DocIconProps = TextType & {
@@ -15,8 +13,6 @@ export const DocIcon = ({
$weight = '400',
...textProps
}: DocIconProps) => {
const { t } = useTranslation();
if (!emoji) {
return <>{defaultIcon}</>;
}
@@ -28,7 +24,7 @@ export const DocIcon = ({
$variation={$variation}
$weight={$weight}
aria-hidden="true"
aria-label={t('Document emoji icon')}
data-testid="doc-emoji-icon"
>
{emoji}
</Text>

View File

@@ -66,7 +66,7 @@ export const SimpleDocItem = ({
{isPinned ? (
<PinnedDocumentIcon
aria-hidden="true"
aria-label={t('Pin document icon')}
data-testid="doc-pinned-icon"
color={colorsTokens['primary-500']}
/>
) : (
@@ -75,7 +75,7 @@ export const SimpleDocItem = ({
defaultIcon={
<SimpleFileIcon
aria-hidden="true"
aria-label={t('Simple document icon')}
data-testid="doc-simple-icon"
color={colorsTokens['primary-500']}
/>
}