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): Fix invalid task input labels #6548

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

eatyourgreens
Copy link
Contributor

Replace div with span in task input labels.

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

Package

  • lib-classifier

Linked Issue and/or Talk Post

How to Review

This shouldn't change any visible behaviour of task input labels. It should silence any React dev warnings about invalid DOM nesting in task input components. Similarly, any warnings in the Storybook should be fixed (does the Storybook check for invalid HTML?)

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

@coveralls
Copy link

coveralls commented Dec 12, 2024

Coverage Status

coverage: 77.39% (+0.04%) from 77.354%
when pulling c2b3e2c on eatyourgreens:patch-1
into 3e8f2ee on zooniverse:master.

@eatyourgreens eatyourgreens changed the title Fix invalid task input labels fix(a11y): Fix invalid task input labels Dec 12, 2024
Replace `div` with `span` in task input labels.
Copy link
Contributor

@goplayoutside3 goplayoutside3 left a comment

Choose a reason for hiding this comment

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

Oops this was introduced by me in #6532 thanks for catching it!

It should silence any React dev warnings about invalid DOM nesting in task input components.

No dev warnings in the console even with div inside the input.

Similarly, any warnings in the Storybook should be fixed (does the Storybook check for invalid HTML?)

Also no console warnings or invalid html flagged by addon-a11y. Any easy thing to miss.

@goplayoutside3 goplayoutside3 merged commit 0debd4f into zooniverse:master Dec 16, 2024
8 checks passed
@eatyourgreens
Copy link
Contributor Author

No dev warnings in the console even with div inside the input.

That's interesting. I've been using React 19 on another project (which uses Material UI.) It warns about potential hydration errors on every instance of invalid HTML.

Also no console warnings or invalid html flagged by addon-a11y. Any easy thing to miss.

The storybook runs axe, which used to warn about invalid HTML but might not now that the requirement for valid HTML was removed/relaxed in WCAG 2.2.

@eatyourgreens eatyourgreens deleted the patch-1 branch January 8, 2025 06:16
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.

A11y: invalid HTML in TaskInputLabel
3 participants