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

feat(a11y): improvements to attachment field #4873

Merged
merged 2 commits into from
Sep 15, 2022

Conversation

justynoh
Copy link
Contributor

Problem

Attachment fields had a couple major issues with a11y.

  1. It did not announce itself as a link or button to upload.
  2. It did not refocus correctly onclick (both upload and remove).
  3. It kept repeating the question title on focus of the upload field, which it should not.

Closes #4181

Solution

  1. Added additional VisuallyHidden components with more descriptive sentences, and made the components that aren't super accessible aria-hidden.
  2. When re-rendering, remove the mergedRefs prop from the enclosing box, so that the the focus will go onto the correct element again.
  3. Remove aria-describedby which was causing the dropzone focus to repeat the associated formlabel. This was much too verbose because users will already have heard the form label question before scrolling to the dropzone field.

Breaking Changes

  • No - this PR is backwards compatible
Screen.Recording.2022-09-15.at.3.08.05.PM.mov

@justynoh justynoh marked this pull request as ready for review September 15, 2022 07:43
@justynoh justynoh merged commit d36b599 into form-v2/develop Sep 15, 2022
@justynoh justynoh deleted the form-v2/fix/a11y-attachment branch September 15, 2022 08:23
@justynoh justynoh mentioned this pull request Oct 5, 2022
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.

2 participants