-
Notifications
You must be signed in to change notification settings - Fork 61
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
Added labels to buttons #42
base: development_v2
Are you sure you want to change the base?
Conversation
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.
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 😄 |
@@ -78,7 +78,7 @@ const Search = ({ handleReset }) => { | |||
inputProps={{ "aria-label": i18n.t("navigation.search") }} | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add i18n.t for Menu
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 couldn't find any direct translation for the menu in en.yml
@@ -76,7 +76,7 @@ const Nav = () => { | |||
<div className={css.drawerHeaderContainer}> | |||
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too
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 couldn't find any direct translation for the menu in en.yml
app/javascript/components/record-form/form/field-types/attachments/attachment-input.jsx
Outdated
Show resolved
Hide resolved
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.