-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
ARIA labels in Toolbar #1537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARIA labels in Toolbar #1537
Conversation
Translation with new namespace I18Next configuration leaning on default separator and namespace Broom: i18n + debug:false
Test entry for Toolbar.test.jsx
About : broom About lines 17-26 Nav component : changes in keys KeyboardShortcutModal.jsx: Key now in Common
Labels included in translations.json
Labels included in translations.json
Labels included in translations.json
Labels included in translations.json Snapshot updated npm run test -- -u
Updated names to call the labels Common namespace without currently used entries
Missing Common.p5logoARIA key
Deleting commented line 78
…nav_2 # Conflicts: # client/modules/IDE/components/Toolbar.jsx
|
|
||
|
|
||
| import { ToolbarComponent } from './Toolbar'; | ||
| import { i18ntest } from '../../../i18n-test'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're not using the i18ntest variable, then there's no need to assign it here. You can just do this:
import '../../../i18n-test';
| this.props.setGridOutput(true); | ||
| }} | ||
| aria-label="Play sketch" | ||
| aria-label={i18n.t('Toolbar.PlaySketchARIA')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use withTranslation() here. The react-i18next documentation doesn't mention the method you're using here at all which makes me concerned about using it.
All of these can be this.props.t('...')
|
@andrewn I made the changes requested, but the tests are failing in toolbar.test, do you have an idea what could fix this? Can you take a look please? |
I have verified that this pull request:
npm run lint)This pull request: