mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -05:00
Add aria label to project button
This commit is contained in:
parent
75de066dc6
commit
badf817ab1
3 changed files with 8 additions and 2 deletions
|
@ -72,6 +72,8 @@
|
||||||
"general.download": "Download",
|
"general.download": "Download",
|
||||||
"general.password": "Password",
|
"general.password": "Password",
|
||||||
"general.press": "Press",
|
"general.press": "Press",
|
||||||
|
"general.projectsSelected": "Projects Selected",
|
||||||
|
"general.projectsNotS": "Projects",
|
||||||
"general.privacyPolicy": "Privacy Policy",
|
"general.privacyPolicy": "Privacy Policy",
|
||||||
"general.projects": "Projects",
|
"general.projects": "Projects",
|
||||||
"general.profile": "Profile",
|
"general.profile": "Profile",
|
||||||
|
|
|
@ -128,22 +128,26 @@ class Explore extends React.Component {
|
||||||
active: (this.state.itemType === type)
|
active: (this.state.itemType === type)
|
||||||
});
|
});
|
||||||
return (
|
return (
|
||||||
|
// **** ADD A CONDITIONAL HERE ****
|
||||||
<a href={`/explore/${type}/${this.state.category}/${this.state.mode}`}>
|
<a href={`/explore/${type}/${this.state.category}/${this.state.mode}`}>
|
||||||
<li className={classes}>
|
<li className={classes}>
|
||||||
{this.state.itemType === type ? [
|
{this.state.itemType === type ? [
|
||||||
<img
|
<img
|
||||||
|
|
||||||
className={`tab-icon ${type}`}
|
className={`tab-icon ${type}`}
|
||||||
key={`tab-${type}`}
|
key={`tab-${type}`}
|
||||||
src={`/svgs/tabs/${type}-active.svg`}
|
src={`/svgs/tabs/${type}-active.svg`}
|
||||||
|
aria-label={this.props.intl.formatMessage({id: 'general.projectsSelected'})}
|
||||||
/>
|
/>
|
||||||
] : [
|
] : [
|
||||||
<img
|
<img
|
||||||
className={`tab-icon ${type}`}
|
className={`tab-icon ${type}`}
|
||||||
key={`tab-${type}`}
|
key={`tab-${type}`}
|
||||||
src={`/svgs/tabs/${type}-inactive.svg`}
|
src={`/svgs/tabs/${type}-inactive.svg`}
|
||||||
|
aria-label={this.props.intl.formatMessage({id: 'general.projectsNotS'})}
|
||||||
/>
|
/>
|
||||||
]}
|
]}
|
||||||
<FormattedMessage id={`general.${type}`} />
|
<span aria-hidden="true"><FormattedMessage aria-label="" id={`general.${type}`} /></span>
|
||||||
</li>
|
</li>
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><title>Icons</title><path d="M13.39,3.29V9.4a0.41,0.41,0,0,1-.14.31,4.18,4.18,0,0,1-5.51,0,3.42,3.42,0,0,0-2.23-.84,3.35,3.35,0,0,0-2.07.72v4.05a0.42,0.42,0,1,1-.84,0V3.29A0.41,0.41,0,0,1,2.87,2.9,4.17,4.17,0,0,1,8.27,3a3.39,3.39,0,0,0,4.45,0,0.39,0.39,0,0,1,.43-0.06A0.4,0.4,0,0,1,13.39,3.29Z" fill="#26d9bb" stroke="#22b296" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
<svg aria-label="Check Check" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><title>Icons</title><path d="M13.39,3.29V9.4a0.41,0.41,0,0,1-.14.31,4.18,4.18,0,0,1-5.51,0,3.42,3.42,0,0,0-2.23-.84,3.35,3.35,0,0,0-2.07.72v4.05a0.42,0.42,0,1,1-.84,0V3.29A0.41,0.41,0,0,1,2.87,2.9,4.17,4.17,0,0,1,8.27,3a3.39,3.39,0,0,0,4.45,0,0.39,0.39,0,0,1,.43-0.06A0.4,0.4,0,0,1,13.39,3.29Z" fill="#26d9bb" stroke="#22b296" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 499 B |
Loading…
Reference in a new issue