Skip to content

Commit

Permalink
fix(www): Improve accessibility of showcase page (#20236)
Browse files Browse the repository at this point in the history
* fix(www): Improve accessibility of showcase page

* fix: fixing linting errors
  • Loading branch information
JakePartusch authored and GatsbyJS Bot committed Dec 20, 2019
1 parent c484c04 commit 84139bf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
12 changes: 8 additions & 4 deletions www/src/views/shared/collapsible.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Collapsible extends Component {
width: `100%`,
}}
>
<h4
<button
sx={{
alignItems: `center`,
color: `textMuted`,
Expand All @@ -47,22 +47,26 @@ class Collapsible extends Component {
flexShrink: 0,
fontWeight: `body`,
fontSize: 1,
mt: 6,
mr: 7,
my: 6,
mr: 4,
p: 0,
letterSpacing: `tracked`,
textTransform: `uppercase`,
background: `none`,
border: `none`,
"&:hover": {
color: `gatsby`,
},
}}
aria-expanded={!collapsed}
onClick={this.handleClick}
>
{heading}
{` `}
<span sx={{ ml: `auto` }} css={{ display: `flex` }}>
{collapsed ? <FaAngleDown /> : <FaAngleUp />}
</span>
</h4>
</button>
<div
css={{
display: collapsed ? `none` : `block`,
Expand Down
2 changes: 2 additions & 0 deletions www/src/views/showcase/showcase-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const ShowcaseList = ({ items, count, filters, onCategoryClick }) => {
href={node.source_url}
target="_blank"
rel="noopener noreferrer"
aria-label={`Open source code for ${node.title}`}
>
<GithubIcon style={{ verticalAlign: `text-top` }} />
</a>
Expand All @@ -71,6 +72,7 @@ const ShowcaseList = ({ items, count, filters, onCategoryClick }) => {
href={node.main_url}
target="_blank"
rel="noopener noreferrer"
aria-label={`Open website for ${node.title}`}
>
<LaunchSiteIcon style={{ verticalAlign: `text-top` }} />
</a>
Expand Down
2 changes: 2 additions & 0 deletions www/src/views/starter-library/starter-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ const StartersList = ({ urlState, starters, count, sortRecent }) => {
...shortcutIcon,
svg: { verticalAlign: `text-top !important` },
}}
aria-label={`Open source code for ${name}`}
>
<GithubIcon />
</a>
Expand All @@ -192,6 +193,7 @@ const StartersList = ({ urlState, starters, count, sortRecent }) => {
...shortcutIcon,
svg: { verticalAlign: `text-top !important` },
}}
aria-label={`Open demo for ${name}`}
>
<LaunchDemoIcon />
</a>
Expand Down

0 comments on commit 84139bf

Please sign in to comment.