Skip to content

Commit 14c84f0

Browse files
committed
✨(frontend) add h1 for SR on 40X pages and remove alt texts
improves screen reader support on error pages by clarifying structure Signed-off-by: Cyril <c.gromoff@gmail.com>
1 parent 6cc4263 commit 14c84f0

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ and this project adheres to
2525
- ♿ remove redundant aria-label on hidden icons and update tests #1432
2626
- ♿ improve semantic structure and aria roles of leftpanel #1431
2727
- ♿ add default background to left panel for better accessibility #1423
28-
28+
- ♿ add h1 for SR on 40X pages and remove alt texts #1438
2929
### Fixed
3030

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

src/frontend/apps/impress/src/pages/401.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,13 @@ const Page: NextPageWithLayout = () => {
3939
$gap="1rem"
4040
$padding={{ bottom: '2rem' }}
4141
>
42+
<Text as="h1" $textAlign="center" className="sr-only">
43+
{t('401 Unauthorized')} - {t('Docs')}
44+
</Text>
4245
<Image
4346
className="c__image-system-filter"
4447
src={img401}
45-
alt={t('Image 401')}
48+
alt=""
4649
style={{
4750
maxWidth: '100%',
4851
height: 'auto',

src/frontend/apps/impress/src/pages/404.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ const Page: NextPageWithLayout = () => {
3535
$gap="1rem"
3636
$padding={{ bottom: '2rem' }}
3737
>
38+
<Text as="h1" $textAlign="center" className="sr-only">
39+
{t('Page Not Found - Error 404')} - {t('Docs')}
40+
</Text>
3841
<Image
3942
className="c__image-system-filter"
4043
src={img403}
41-
alt={t('Image 403')}
44+
alt=""
4245
style={{
4346
maxWidth: '100%',
4447
height: 'auto',

0 commit comments

Comments
 (0)