-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
640452e
commit cc9d2b8
Showing
11 changed files
with
59 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export const IFRAME_SELECTOR = '#html-reader-iframe'; | ||
export const SCALE_STEP = 0.1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Box, Link, useStyleConfig } from '@chakra-ui/react'; | ||
import React from 'react'; | ||
|
||
/** | ||
* SkipNavigation is a component that is used to provide a link | ||
* used to skip to the main content of the page using the `#mainContent` | ||
* id. This link is visually hidden but can be read by screenreaders. | ||
*/ | ||
export const SkipNavigation = (): React.ReactElement => { | ||
const styles = useStyleConfig('SkipNavigation'); | ||
|
||
return ( | ||
<Box as="nav" aria-label="Skip to Main Content" __css={styles}> | ||
<Link href="#mainContent" textDecoration="none"> | ||
Skip to Main Content | ||
</Link> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default SkipNavigation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const SkipNavigation = { | ||
baseStyle: { | ||
// Don't display links by default... | ||
a: { | ||
backgroundColor: 'ui.white', | ||
height: '1px', | ||
left: '-10000px', | ||
overflow: 'hidden', | ||
position: 'absolute', | ||
top: 'auto', | ||
width: '1px', | ||
// Only display when the user focuses on the links. | ||
_focus: { | ||
height: 'auto', | ||
left: '2', | ||
paddingX: '2', | ||
paddingY: '1', | ||
top: '2', | ||
width: 'auto', | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default SkipNavigation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters