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): user select menu labels #6602

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

eatyourgreens
Copy link
Contributor

@eatyourgreens eatyourgreens commented Jan 8, 2025

  • fix: 'Selected: [object Object]' in the labels for user dropdown menus.
  • add plain English labels for the project and date range menus.
  • fix: understandable labels for the group stats visibility menu.

Please request review from @zooniverse/frontend team or an individual member of that team.

Package

  • lib-user

Linked Issue and/or Talk Post

How to Review

The dropdown menus on the user stats page should have accessible names now, including the selected option.

The group stats visibility menu should also have a plain English name, reflecting the selected option, in the tests and in the storybook.

Checklist

PR Creator - Please cater the checklist to fit the review needed for your code changes.
PR Reviewer - Use the checklist during your review. Each point should be checkmarked or discussed before PR approval.

General

  • Tests are passing locally and on Github
  • Documentation is up to date and changelog has been updated if appropriate
  • You can yarn panic && yarn bootstrap or docker-compose up --build and FEM works as expected
  • FEM works in all major desktop browsers: Firefox, Chrome, Edge, Safari (Use Browserstack account as needed)
  • FEM works in a mobile browser

General UX

Example Staging Project: i-fancy-cats

  • All pages of a FEM project load: Home Page, Classify Page, and About Pages
  • Can submit a classification
  • Can sign-in and sign-out
  • The component is accessible

Bug Fix

  • The PR creator has listed user actions to use when testing if bug is fixed
  • The bug is fixed
  • Unit tests are added or updated

@@ -37,15 +37,15 @@ describe('components > shared > MainContent', function () {

it('should show "ALL PROJECTS" as the selected project', function () {
render(<DefaultStory />)
const projectSelect = screen.getByRole('textbox', { name: 'project-select' })
const projectSelect = screen.getByRole('textbox', { name: 'Select project, ALL PROJECTS' })
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Grommet appends the selected value to the name of the textbox. I'm not sure why, since it will also be read out as the textbox value. 🤷‍♂️

https://github.com/grommet/grommet/blob/474cc08ed3ced7b1021985db0fcacae448bab2ca/src/js/components/Select/Select.js#L374-L379

@coveralls
Copy link

coveralls commented Jan 8, 2025

Coverage Status

coverage: 77.353% (-0.04%) from 77.389%
when pulling 2f290ed on eatyourgreens:user-select-labels
into d8943f1 on zooniverse:master.

- fix 'Selected: [object Object]' in the labels for user dropdown menus.
- add plain English labels for the project and date range menus.
Copy link
Contributor

@mcbouslog mcbouslog left a comment

Choose a reason for hiding this comment

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

Confirmed locally with VoiceOver, changes look good to me, thank you @eatyourgreens ! 🚀

@mcbouslog mcbouslog merged commit 1d15670 into zooniverse:master Jan 17, 2025
8 checks passed
@eatyourgreens eatyourgreens deleted the user-select-labels branch January 18, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lib-user: stats select menus don't have accessible names
3 participants