ARIA role attributes added (#257)
Co-authored-by: Elchin Zakizadeh <elchinzadeh@Elchins-MacBook-Pro.local>
Elchin Zakizadeh committed
Oct 25, 2022 at 11:48 UTC
41b6753d9957dbf95dca7bc302b36a01bbf9d7eb
4 files changed
+5
-3
theme/src/components/header.js
+1
-1
@@ -35,7 +35,7 @@ function Header({location, isSearchEnabled = true}) {
35
const titleStyle = { 'color': '#dddddd', 'fontWeight': '600', 'display': 'flex', 'alignItems': 'center' };
36
37
return (
38
- <Sticky>
38
+ <Sticky role="banner">
39
<NpmHeaderBar />
40
<Flex
41
height={HEADER_HEIGHT}
theme/src/components/hero-layout.js
+1
-1
@@ -14,7 +14,7 @@ function HeroLayout({children, pageContext, location}) {
14
<Flex flexDirection="column" minHeight="100vh">
15
<Head />
16
<Header location={location} isSearchEnabled={pageContext.isSearchEnabled} />
17
- <Flex flex="1 1 auto" flexDirection="row">
17
+ <Flex flex="1 1 auto" flexDirection="row" role="main">
18
<Box display={['none', null, null, 'block']}>
19
<Sidebar
20
editOnGitHub={
theme/src/components/layout.js
+2
-1
@@ -50,7 +50,7 @@ function Layout({children, pageContext, location}) {
50
<Flex flexDirection="column" minHeight="100vh">
51
<Head title={title} description={description} />
52
<Header location={location} isSearchEnabled={pageContext.isSearchEnabled} />
53
- <Flex flex="1 1 auto" flexDirection="row" css={{zIndex: 0}}>
53
+ <Flex flex="1 1 auto" flexDirection="row" css={{zIndex: 0}} role="main">
54
<Box display={['none', null, null, 'block']}>
55
<Sidebar
56
editOnGitHub={
@@ -74,6 +74,7 @@ function Layout({children, pageContext, location}) {
74
mx="auto"
75
p={[5, 6, null, 7]}
76
css={{alignItems: 'start', alignSelf: 'start'}}
77
+ role="region"
78
>
79
<Box css={{gridArea: 'heading'}}>
80
<BorderBox
theme/src/components/sidebar.js
+1
@@ -13,6 +13,7 @@ function Sidebar({location, editOnGitHub}) {
13
minWidth={260}
14
color="gray.8"
15
bg="gray.0"
16
+ role="navigation"
17
>
18
<BorderBox
19
borderWidth={0}