Skip to content

Commit 84139bf

Browse files
JakePartuschGatsbyJS Bot
authored and
GatsbyJS Bot
committed
fix(www): Improve accessibility of showcase page (#20236)
* fix(www): Improve accessibility of showcase page * fix: fixing linting errors
1 parent c484c04 commit 84139bf

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

www/src/views/shared/collapsible.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Collapsible extends Component {
3838
width: `100%`,
3939
}}
4040
>
41-
<h4
41+
<button
4242
sx={{
4343
alignItems: `center`,
4444
color: `textMuted`,
@@ -47,22 +47,26 @@ class Collapsible extends Component {
4747
flexShrink: 0,
4848
fontWeight: `body`,
4949
fontSize: 1,
50-
mt: 6,
51-
mr: 7,
50+
my: 6,
51+
mr: 4,
52+
p: 0,
5253
letterSpacing: `tracked`,
5354
textTransform: `uppercase`,
55+
background: `none`,
56+
border: `none`,
5457
"&:hover": {
5558
color: `gatsby`,
5659
},
5760
}}
61+
aria-expanded={!collapsed}
5862
onClick={this.handleClick}
5963
>
6064
{heading}
6165
{` `}
6266
<span sx={{ ml: `auto` }} css={{ display: `flex` }}>
6367
{collapsed ? <FaAngleDown /> : <FaAngleUp />}
6468
</span>
65-
</h4>
69+
</button>
6670
<div
6771
css={{
6872
display: collapsed ? `none` : `block`,

www/src/views/showcase/showcase-list.js

+2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const ShowcaseList = ({ items, count, filters, onCategoryClick }) => {
6060
href={node.source_url}
6161
target="_blank"
6262
rel="noopener noreferrer"
63+
aria-label={`Open source code for ${node.title}`}
6364
>
6465
<GithubIcon style={{ verticalAlign: `text-top` }} />
6566
</a>
@@ -71,6 +72,7 @@ const ShowcaseList = ({ items, count, filters, onCategoryClick }) => {
7172
href={node.main_url}
7273
target="_blank"
7374
rel="noopener noreferrer"
75+
aria-label={`Open website for ${node.title}`}
7476
>
7577
<LaunchSiteIcon style={{ verticalAlign: `text-top` }} />
7678
</a>

www/src/views/starter-library/starter-list.js

+2
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ const StartersList = ({ urlState, starters, count, sortRecent }) => {
180180
...shortcutIcon,
181181
svg: { verticalAlign: `text-top !important` },
182182
}}
183+
aria-label={`Open source code for ${name}`}
183184
>
184185
<GithubIcon />
185186
</a>
@@ -192,6 +193,7 @@ const StartersList = ({ urlState, starters, count, sortRecent }) => {
192193
...shortcutIcon,
193194
svg: { verticalAlign: `text-top !important` },
194195
}}
196+
aria-label={`Open demo for ${name}`}
195197
>
196198
<LaunchDemoIcon />
197199
</a>

0 commit comments

Comments
 (0)