Skip to content

Commit 0c24550

Browse files
author
Luke Pearson
committed
Added default tabIndex of 0 to skiplink
1 parent 9068e7b commit 0c24550

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/components/skip-link/SkipLink.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class SkipLink extends React.Component<SkipLinkProps> {
1414
static defaultProps = {
1515
children: 'Skip to main content',
1616
href: '#maincontent',
17+
tabIndex: 0,
1718
};
1819

1920
constructor(props: SkipLinkProps, ...rest: any[]) {

src/components/skip-link/__tests__/__snapshots__/SkipLink.test.tsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ exports[`SkipLink matches snapshot: SkipLink 1`] = `
55
className="nhsuk-skip-link"
66
href="#maincontent"
77
onClick={[Function]}
8+
tabIndex={0}
89
>
910
Skip to main content
1011
</a>

0 commit comments

Comments
 (0)