diff --git a/src/common-elements/headers.ts b/src/common-elements/headers.ts index 30b96593..50f0793b 100644 --- a/src/common-elements/headers.ts +++ b/src/common-elements/headers.ts @@ -13,14 +13,18 @@ export const headerCommonMixin = level => css` line-height: ${({ theme }) => theme.typography.headings.lineHeight}; `; -export const H1 = styled.h1` +export const H1 = styled.h1.attrs(props => ({ + tabIndex: props.tabIndex || '0', +}))` ${headerCommonMixin(1)}; color: ${({ theme }) => theme.colors.text.primary}; ${extensionsHook('H1')}; `; -export const H2 = styled.h2` +export const H2 = styled.h2.attrs(props => ({ + tabIndex: props.tabIndex || '0', +}))` ${headerCommonMixin(2)}; color: ${({ theme }) => theme.colors.text.primary}; margin: 0 0 20px; @@ -28,7 +32,9 @@ export const H2 = styled.h2` ${extensionsHook('H2')}; `; -export const H3 = styled.h2` +export const H3 = styled.h2.attrs(props => ({ + tabIndex: props.tabIndex || '0', +}))` ${headerCommonMixin(3)}; color: ${({ theme }) => theme.colors.text.primary}; diff --git a/src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap b/src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap index 9624647f..0ddeb76b 100644 --- a/src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap +++ b/src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`SecurityRequirement should render SecurityDefs 1`] = ` -"
Get access to data while protecting your account credentials. +"
Get access to data while protecting your account credentials. OAuth2 is also a safer and more secure way to give you access.
implicit
http://petstore.swagger.io/api/oauth/dialog
write:pets
- modify pets in your account
read:pets
- read your pets
-GitLab Personal Access Token description
-PRIVATE-TOKEN
GitLab OpenIdConnect description
-https://gitlab.com/.well-known/openid-configuration
basic
GitLab Personal Access Token description
+PRIVATE-TOKEN
GitLab OpenIdConnect description
+https://gitlab.com/.well-known/openid-configuration
basic