-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
adding labels to user input #14987
adding labels to user input #14987
Conversation
Thanks for making a pull request to jupyterlab! |
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.
Thanks @s596757
I made a couple of suggestions to improve this.
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
Changes made, please review again. Thank you :) |
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
@@ -107,6 +107,7 @@ class LineFormComponent extends React.Component< | |||
<input | |||
type="text" | |||
className="jp-lineFormInput" | |||
aria-label={this._trans('Line Column form')} |
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 it would be better to give this text input an id and connect it to the label below, e.g.:
const textInputId = DOMUtils.createDomID() + '-line-number-input';
<input id={textInputId} ... />
...
<label for={textInputId}
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.
This would be htmlFor={textInputId}
because React.
@@ -75,7 +75,7 @@ export class Component extends React.Component<IProps, IState> { | |||
<InputGroup | |||
className="filter" | |||
type="text" | |||
placeholder={trans.__('Filter…')} | |||
placeholder={trans.__('Find')} |
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.
Yeah I agree. This is more like "Find" (Ctrl + F) functionality than filter.
@@ -218,6 +218,7 @@ function BuildSettingForm(props: ISettingFormProps): JSX.Element { | |||
<div className="jp-inputFieldWrapper jp-FormGroup-contentItem"> | |||
<input | |||
className="form-control" | |||
aria-label={props.trans.__('Server name')} |
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, I think it would be better to connect this input with the "Server name" above. Will probably need to change the <h3>
to a <label>
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.
These are good improvements, but they need to be implemented slightly differently in a few places, I think, to avoid duplication of code, as well as translation strings.
Also please update the PR description so that it links to the appropriate issue. I think there's a typo currently.
Co-authored-by: gabalafou <gabriel@fouasnon.com>
Co-authored-by: gabalafou <gabriel@fouasnon.com>
Co-authored-by: gabalafou <gabriel@fouasnon.com>
Closing in favour of #15222 |
Text Issue #6
In order to provide meaningful labels for user input, as per #9399,
I have done the following:
Search fields have been changed to specify what they are searching e.g. shortcuts.
added type=text to find/replace
added aria-labels to user inputs
added aria labels and type to Line Column Form
Labelled top nav bar and updated placeholder text