mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 15:47:53 -05:00
Merge pull request #7261 from bocoup/issue-7173
Fix gh-7173: The select element in the footer needs proper aria labeling
This commit is contained in:
commit
65ac31822e
2 changed files with 7 additions and 2 deletions
|
@ -1,5 +1,7 @@
|
|||
const bindAll = require('lodash.bindall');
|
||||
const classNames = require('classnames');
|
||||
const injectIntl = require('react-intl').injectIntl;
|
||||
const intlShape = require('react-intl').intlShape;
|
||||
const PropTypes = require('prop-types');
|
||||
const React = require('react');
|
||||
|
||||
|
@ -37,6 +39,7 @@ class LanguageChooser extends React.Component {
|
|||
<Form className={classNames('language-chooser', this.props.className)}>
|
||||
<Select
|
||||
required
|
||||
aria-label={this.props.intl.formatMessage({id: 'general.languageChooser'})}
|
||||
name="language"
|
||||
options={languageOptions}
|
||||
value={this.props.locale}
|
||||
|
@ -50,7 +53,8 @@ class LanguageChooser extends React.Component {
|
|||
LanguageChooser.propTypes = {
|
||||
className: PropTypes.string,
|
||||
languages: PropTypes.object, // eslint-disable-line react/forbid-prop-types
|
||||
locale: PropTypes.string
|
||||
locale: PropTypes.string,
|
||||
intl: intlShape
|
||||
};
|
||||
|
||||
LanguageChooser.defaultProps = {
|
||||
|
@ -58,4 +62,4 @@ LanguageChooser.defaultProps = {
|
|||
locale: 'en'
|
||||
};
|
||||
|
||||
module.exports = LanguageChooser;
|
||||
module.exports = injectIntl(LanguageChooser);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"general.languageChooser": "Select Language",
|
||||
"general.accountSettings": "Account settings",
|
||||
"general.about": "About",
|
||||
"general.aboutScratch": "About Scratch",
|
||||
|
|
Loading…
Reference in a new issue