Skip to content

Commit 272de10

Browse files
committed
Test skip-to-list tab navigation and focus
1 parent 50a0683 commit 272de10

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/e2e/integration/skip-to-list.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
describe('skip-link list', () => {
1+
describe('Skip link list', () => {
22
beforeEach(() => {
33
cy.visit('/skip-to-list.html')
44
})
@@ -8,4 +8,14 @@ describe('skip-link list', () => {
88
.get('[data-vst="skip-to-list"]')
99
.should('contain', 'Skip links')
1010
})
11+
12+
it('Should traverse links on tab', () => {
13+
cy.get('body').tab().tab()
14+
cy.focused().should('contain', 'Footer')
15+
})
16+
17+
it('Should focus relevant element on link press', () => {
18+
cy.get('body').tab().click()
19+
cy.focused().should('have.id', 'main')
20+
})
1121
})

0 commit comments

Comments
 (0)