Skip to content

Commit 86d98f0

Browse files
committed
✨(frontend) add sr-only instructions with aria-describedby links
improves screen reader support with contextual accessibility guidance Signed-off-by: Cyril <[email protected]>
1 parent 7de7931 commit 86d98f0

File tree

1 file changed

+7
-0
lines changed
  • src/frontend/apps/impress/src/features/docs/doc-tree/components

1 file changed

+7
-0
lines changed

src/frontend/apps/impress/src/features/docs/doc-tree/components/DocTree.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ export const DocTree = ({ currentDoc }: DocTreeProps) => {
210210
$height="100%"
211211
role="tree"
212212
aria-label={t('Document tree')}
213+
aria-describedby="doc-tree-keyboard-instructions"
213214
$css={css`
214215
/* Remove outline from TreeViewItem wrapper elements */
215216
.c__tree-view--row {
@@ -229,6 +230,12 @@ export const DocTree = ({ currentDoc }: DocTreeProps) => {
229230
}
230231
`}
231232
>
233+
{/* Instructions clavier pour les lecteurs d'écran */}
234+
<Box id="doc-tree-keyboard-instructions" className="sr-only">
235+
{t(
236+
'Use arrow keys to navigate between documents. Press Enter to open a document. Press F2 to access document actions.',
237+
)}
238+
</Box>
232239
<Box
233240
$padding={{ horizontal: 'sm', top: 'sm', bottom: '4px' }}
234241
$css={css`

0 commit comments

Comments
 (0)