Added labels to buttons - #42
Conversation
jtoliver
left a comment
There was a problem hiding this comment.
All the labels should be translated using i18n. They should be meaningful also. If the button is an icon of a trash can we should use the label "Remove". If the button is just text, use the button text. I think "menu" is fine for menus.
|
@jtoliver I have added the translations to |
|
@NidhiKJha Make sure you pull the latest. All the buttons have been refactored to use the new action-button component. You should be able to set the aria-label a newly created (ariaLabel prop || text). Let me know if you have any questions |
|
Hi @jtoliver I have updated the code but I couldn't find |
|
You should be able to add the aria label to the Button component in The text prop there is the button text. For |
|
Hi @jtoliver , I have made the suggested changes. Please review this pull request. Thanks 😄 |
| endAdornment={ | ||
| <InputAdornment position="end"> | ||
| <IconButton className={css.iconSearchButton} onClick={handleClear}> | ||
| <IconButton aria-label="Menu" className={css.iconSearchButton} onClick={handleClear}> |
There was a problem hiding this comment.
Could you add i18n.t for Menu
There was a problem hiding this comment.
I couldn't find any direct translation for the menu in en.yml
| <Hidden mdUp implementation="css"> | ||
| <div className={css.drawerHeader}> | ||
| <IconButton onClick={handleToggleDrawer(false)}> | ||
| <IconButton aria-label="Menu" onClick={handleToggleDrawer(false)}> |
There was a problem hiding this comment.
I couldn't find any direct translation for the menu in en.yml
|
Left a few comments for you, make sure to run |
|
Thanks for the review, I have made all the suggested changes but I couldn't find any direct translation for the menu in en.yml. |
|
You can add it under the buttons: key in /config/locales/en.yml. To generate a new locale file stop rails server then run |
This pull request is to solve the issue Form control element
<button>has no associated label. This pull request is not complete. I am currently working on it to add more meaningful labels and tests.