File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
src/frontend/apps/e2e/__tests__/app-impress Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ and this project adheres to
1717 - ♿(frontend) improve ARIA in doc grid and editor for a11y #1519
1818 - ♿(frontend) improve accessibility and styling of summary table #1528
1919 - ♿(frontend) add focus trap and enter key support to remove doc modal #1531
20+ - ♿(frontend) add skip to content button for keyboard accessibility #1624
2021- 🐛(docx) fix image overflow by limiting width to 600px during export #1525
2122- 🐛(frontend) preserve @ character when esc is pressed after typing it #1512
2223- 🐛(frontend) make summary button fixed to remain visible during scroll #1581
Original file line number Diff line number Diff line change @@ -176,3 +176,24 @@ test.describe('Header: Override configuration', () => {
176176 await expect ( logoImage ) . toHaveAttribute ( 'alt' , '' ) ;
177177 } ) ;
178178} ) ;
179+
180+ test . describe ( 'Header: Skip to Content' , ( ) => {
181+ test ( 'it displays skip link on first TAB and focuses main content on click' , async ( {
182+ page,
183+ } ) => {
184+ await page . goto ( '/' ) ;
185+
186+ // First TAB shows the skip link
187+ await page . keyboard . press ( 'Tab' ) ;
188+
189+ // The skip link should be visible and focused
190+ const skipLink = page . getByRole ( 'link' , { name : 'Go to content' } ) ;
191+ await expect ( skipLink ) . toBeFocused ( ) ;
192+ await expect ( skipLink ) . toBeVisible ( ) ;
193+
194+ // Clicking moves focus to the main content
195+ await skipLink . click ( ) ;
196+ const mainContent = page . locator ( 'main#mainContent' ) ;
197+ await expect ( mainContent ) . toBeFocused ( ) ;
198+ } ) ;
199+ } ) ;
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ test.describe('Language', () => {
6666 await page . keyboard . press ( 'Tab' ) ;
6767 await page . keyboard . press ( 'Tab' ) ;
6868 await page . keyboard . press ( 'Tab' ) ;
69+ await page . keyboard . press ( 'Tab' ) ;
6970
7071 await page . keyboard . press ( 'Enter' ) ;
7172
You can’t perform that action at this time.
0 commit comments