Skip to content
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

Closed
wants to merge 18 commits into from
Closed

Conversation

s596757
Copy link

@s596757 s596757 commented Aug 17, 2023

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

@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

Copy link
Member

@fcollonval fcollonval left a 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.

packages/documentsearch/src/searchview.tsx Outdated Show resolved Hide resolved
packages/documentsearch/src/searchview.tsx Outdated Show resolved Hide resolved
packages/extensionmanager/src/widget.tsx Outdated Show resolved Hide resolved
packages/json-extension/src/component.tsx Outdated Show resolved Hide resolved
packages/codeeditor/src/lineCol.tsx Outdated Show resolved Hide resolved
packages/lsp-extension/src/renderer.tsx Outdated Show resolved Hide resolved
packages/settingeditor/src/pluginlist.tsx Outdated Show resolved Hide resolved
packages/shortcuts-extension/src/components/TopNav.tsx Outdated Show resolved Hide resolved
@s596757 s596757 changed the title initial commit adding labels to user input Aug 17, 2023
s596757 and others added 8 commits August 17, 2023 14:29
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>
@s596757
Copy link
Author

s596757 commented Aug 17, 2023

Thanks @s596757

I made a couple of suggestions to improve this.

Changes made, please review again. Thank you :)

packages/documentsearch/src/searchview.tsx Outdated Show resolved Hide resolved
packages/documentsearch/src/searchview.tsx Outdated Show resolved Hide resolved
packages/documentsearch/src/searchview.tsx Outdated Show resolved Hide resolved
packages/shortcuts-extension/src/components/TopNav.tsx Outdated Show resolved Hide resolved
packages/lsp-extension/src/renderer.tsx Outdated Show resolved Hide resolved
s596757 and others added 3 commits August 18, 2023 16:05
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>
s596757 and others added 2 commits August 18, 2023 16:06
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')}
Copy link
Contributor

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}

Copy link
Member

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.

packages/extensionmanager/src/widget.tsx Outdated Show resolved Hide resolved
@@ -75,7 +75,7 @@ export class Component extends React.Component<IProps, IState> {
<InputGroup
className="filter"
type="text"
placeholder={trans.__('Filter…')}
placeholder={trans.__('Find')}
Copy link
Contributor

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')}
Copy link
Contributor

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>

packages/settingeditor/src/pluginlist.tsx Outdated Show resolved Hide resolved
packages/shortcuts-extension/src/components/TopNav.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@gabalafou gabalafou left a 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.

s596757 and others added 3 commits September 4, 2023 09:56
Co-authored-by: gabalafou <gabriel@fouasnon.com>
Co-authored-by: gabalafou <gabriel@fouasnon.com>
Co-authored-by: gabalafou <gabriel@fouasnon.com>
@krassowski
Copy link
Member

Closing in favour of #15222

@krassowski krassowski closed this Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants