✨(frontend) set empty alt on logo due to Axe a11y error
image is decorative; alt was redundant with link aria-label Signed-off-by: Cyril <c.gromoff@gmail.com>
This commit is contained in:
@@ -21,6 +21,8 @@ and this project adheres to
|
||||
- 🐛(frontend) fix duplicate document entries in grid #1479
|
||||
- 🐛(frontend) show full nested doc names with ajustable bar #1456
|
||||
- 🐛(backend) fix trashbin list
|
||||
- ♿(frontend) improve accessibility:
|
||||
- ♿(frontend) remove empty alt on logo due to Axe a11y error #1516
|
||||
|
||||
## [3.8.2] - 2025-10-17
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ test.describe('Header: Override configuration', () => {
|
||||
logo: {
|
||||
src: '/assets/logo-gouv.svg',
|
||||
width: '220px',
|
||||
alt: 'Gouvernement Logo',
|
||||
alt: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -168,8 +168,11 @@ test.describe('Header: Override configuration', () => {
|
||||
await page.goto('/');
|
||||
const header = page.locator('header').first();
|
||||
|
||||
await expect(header.getByAltText('Gouvernement Logo')).toBeVisible();
|
||||
const logoImage = header.getByTestId('header-icon-docs');
|
||||
await expect(logoImage).toBeVisible();
|
||||
|
||||
await expect(header.getByAltText('Docs')).toBeHidden();
|
||||
await expect(logoImage).not.toHaveAttribute('src', '/assets/icon-docs.svg');
|
||||
await expect(logoImage).toHaveAttribute('src', '/assets/logo-gouv.svg');
|
||||
await expect(logoImage).toHaveAttribute('alt', '');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -68,7 +68,7 @@ export const Header = () => {
|
||||
className="c__image-system-filter"
|
||||
data-testid="header-icon-docs"
|
||||
src={logo?.src || '/assets/icon-docs.svg'}
|
||||
alt={logo?.alt || t('Docs')}
|
||||
alt=""
|
||||
width={0}
|
||||
height={0}
|
||||
style={{
|
||||
|
||||
@@ -3,6 +3,5 @@ export interface HeaderType {
|
||||
src?: string;
|
||||
width?: string;
|
||||
height?: string;
|
||||
alt?: string;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -137,8 +137,7 @@
|
||||
"header": {
|
||||
"logo": {
|
||||
"src": "/assets/icon-docs.svg",
|
||||
"width": "32px",
|
||||
"alt": "Notes"
|
||||
"width": "32px"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user