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

Fix a11y issue with Data Science Projects: Pagination #995

Merged

Conversation

jenny-s51
Copy link
Contributor

@jenny-s51 jenny-s51 commented Mar 7, 2023

Towards #965 , specifically DS Projects page: "1-n Projects added"

- The only changes in this PR are related to the pagination component within Table.tsx. 
- Please only review the pagination updates in Table.tsx.

How Has This Been Tested?

Data Science Projects List - before:
Screen Shot 2023-03-07 at 4 14 43 PM

Data Science Projects List - after:
Screen Shot 2023-03-07 at 4 15 03 PM

Test Impact

Request review criteria:

  • The commits have meaningful messages (squashes happen on merge by the bot).
  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work
  • The developer has added tests or explained why testing cannot be added (unit tests & storybook for related changes)

@Gkrumbach07
Copy link
Member

Gkrumbach07 commented Mar 7, 2023

pagination changes look good.

Are you going to rebase this pr? or will it rebase when we merge?

Copy link
Member

@DaoDaoNoCode DaoDaoNoCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pagination changes lgtm, add variant could change the ID of the pagination components and differentiate the top and bottom ones.

Copy link
Contributor

@lucferbux lucferbux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pagination seems great.

frontend/src/components/Table.tsx Outdated Show resolved Hide resolved
@@ -45,6 +45,7 @@ const ServingRuntimeTokenInput: React.FC<ServingRuntimeTokenInputProps> = ({
return (
<FormGroup
label="Service account name"
fieldId="simple-form-name-01"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps not this PR / a11y related -- but simple-form? @lucferbux a little help here? Why is this not properly named? This extends throughout the component.

Copy link
Contributor Author

@jenny-s51 jenny-s51 Mar 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fieldId of FormGroup needs to match the id of TextInput for VO to call out the form labels correctly! Agreed that we could rename it to something that makes more sense - updated here, and in 26c978e#diff-ee0ec36a5925e8c06ac689a1cbec0356d48cb73fe36577c2c8e9046d6d6583e7

@@ -8,7 +8,11 @@ const PasswordInput: React.FC<React.ComponentProps<typeof TextInput>> = (props)
return (
<InputGroup>
<TextInput {...props} type={isPassword ? 'password' : 'text'} />
<Button variant="control" onClick={() => setPassword(!isPassword)}>
<Button
aria-label={isPassword ? 'Show key' : 'Hide key'}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm -- maybe this should be something like Show secret, Show text, Show hidden text, or Show password? Key seems unclear. Not sure if I would be able to understand that if I just heard a screen reader show me. Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed - updated to show/hide password which would make sense as this component is called PasswordInput.

Comment on lines 29 to 33
href="/notebookController"
component="a"
variant="link"
onClick={(e) => {
e.preventDefault();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this should not be more like the companion button on the state-filled page.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -36,6 +36,7 @@ const EnvTypeSelectField: React.FC<EnvTypeSelectFieldProps> = ({
onToggle={() => setOpen(!open)}
selections={envVariable.type || ''}
placeholderText="Select one"
aria-label="Select one"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this not be Select environment variable type? I get the UI doesn't say that -- not sure how much "help" we should grant to screen readers.

How much does an aria-label need to cover "description" of what is happening rather than echoing the text I assume that would be already read by the screen reader (I have not used a screen reader to test this).

Copy link
Contributor Author

@jenny-s51 jenny-s51 Mar 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text should be updated upon rebasing https://github.com/opendatahub-io/odh-dashboard/pull/994/files.

I tested with screenreader, and it seems like PF has some issues with the current select component and the aria-label/placeholder text doesn't get called out by VO. However this will be resolved in the next major release as PF is introducing a new Select component that has the correct VO behavior @andrewballantyne

@andrewballantyne
Copy link
Member

I suspect I ended up commenting on things in the other PRs... apologizes for that.

@openshift-ci openshift-ci bot removed the lgtm label Mar 8, 2023
@openshift-merge-robot openshift-merge-robot added the needs-rebase PR needs to be rebased label Mar 8, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase PR needs to be rebased label Mar 9, 2023
Copy link
Member

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for all your hard work.

@openshift-ci openshift-ci bot added the lgtm label Mar 9, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 9, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne, DaoDaoNoCode, lucferbux

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Mar 9, 2023
@andrewballantyne andrewballantyne linked an issue Mar 9, 2023 that may be closed by this pull request
@openshift-ci openshift-ci bot removed the lgtm label Mar 9, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 9, 2023

New changes are detected. LGTM label has been removed.

@openshift-merge-robot openshift-merge-robot merged commit 3b5c7b8 into opendatahub-io:main Mar 9, 2023
lucferbux pushed a commit to lucferbux/odh-dashboard that referenced this pull request Mar 13, 2023
bartoszmajsak pushed a commit to maistra/odh-dashboard that referenced this pull request Mar 30, 2023
strangiato pushed a commit to strangiato/odh-dashboard that referenced this pull request Oct 18, 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.

[A11y] Address A11y issues on Data Science Projects
6 participants