8000 Fix/a11y file input 1.1.1 v3 by Sulaymon333 · Pull Request #7679 · grommet/grommet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix/a11y file input 1.1.1 v3 #7679

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Sulaymon333
Copy link
Collaborator
@Sulaymon333 Sulaymon333 commented Jun 10, 2025

What does this PR do?

Where should the reviewer start?

What testing has been done on this PR?

  • JAWS to be used to check accessibility by Bill
  • TODO - jest tests to cover changes

How should this be manually tested?

Do Jest tests follow these best practices?

  • screen is used for querying.
  • The correct query is used. (Refer to this list of queries)
  • asFragment() is used for snapshot testing.

Any background context you want to provide?

What are the relevant issues?

Screenshots (if appropriate)

Do the grommet docs need to be updated?

Should this PR be mentioned in the release notes?

Is this change backwards compatible or is it a breaking change?

Yes

Copy link
Collaborator
@MikeKingdom MikeKingdom left a comment

Choose a reason for hiding this comment

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

Thanks for the changes. It's looking a little cleaner.

Comment on lines 87 to 90
"alert": {
"maxSize": "Error - remove file: {fileName} to continue. This file is too large. Attach files which are no larger than {maxSize}.",
"maxFile": "Error - remove file: {fileName} to continue. Attach a maximum of {max} files only."
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

same. I still think we need to avoid saying "Error - remove file"

Suggested change
"alert": {
"maxSize": "Error - remove file: {fileName} to continue. This file is too large. Attach files which are no larger than {maxSize}.",
"maxFile": "Error - remove file: {fileName} to continue. Attach a maximum of {max} files only."
}
"alert": {
"maxSize": "File {fileName} is too large. Attach files which are no larger than {maxSize}.",
"maxFile": "Attach a maximum of {max} files only. File {fileName} is beyond this limit"
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I kept the "Error - remove file:..." because of last review I got from Bill below.

"Hello Sulaymon,
I like option 1.
You can learn the reason in a recording I did for both versions at the link below.

Evaluating w JAWS Alerting Screen Readers Users that a file size is too large or too many files are uploaded-20250605_200407-Meeting Recording.mp4

One suggestion: Although the button in focus says Remove: when telling the user about the error you may want to tell them at the end of that sentence what action must be done to proceed. Such as the file must be removed or something close to that. Then the user knows there is an error and what is needed to continue."

I have shared this version with him as well and I am expecting his evaluation when he is bank next week.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I kept the "Error - remove file:..." because of last review I got from Bill below.

Thanks for review with Bill. That's awesome. I think we can achieve the same thing but avoiding saying it as "Error ...." It's actually one of the standards across a number of our UX folks to avoid that kind of wording. I appreciate the comment from Bill and I'm sure we can still word this well but avoid conflicting with other messaging guidance that's more global to our product base.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for the review. that makes sense. the alert messages are now updated.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@MikeKingdom I do get your comment about using the word error Bill just mentioned that its nice to know that something is wrong right away instead of listening for the screen reader to finish the filename (especially if its long) to then say the file was to large. So I wonder if we can do something like

This file {name} is too large to upload. Remove it to continue.
File is too large. 'filename.pdf' must be removed to continue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@britt6612 thank you for the comment.

I would add something like Alert or Attention at the beginning of the text and possibly mention the max size as well.

So something like

maxSize: Attention, this file {name} is too large. Attach files which are no larger than {maxSize} to continue.
maxFile: Attention, attach a maximum of {max} files only. File {fileName} is beyond this limit.

For maxFile, I believe with the tone above, we are allowing the user to decide what they would like to do. Like Mike pointed out earlier in one of the previous comments for when users attached too many files.

Copy link
Collaborator

Choose a reason for hiding this comment

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

What caused these diffs? Did we change a theme color somewhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did not make any changes to theme color.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please see if you can determine why.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK. I am looking into it more closely.

@Sulaymon333 Sulaymon333 self-assigned this Jun 19, 2025
@Sulaymon333 Sulaymon333 changed the title [DRAFT PR] - Fix/a11y file input 1.1.1 v3 Fix/a11y file input 1.1.1 v3 Jun 19, 2025
@Sulaymon333 Sulaymon333 marked this pull request as ready for review June 19, 2025 09:53
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.

File Input - WCAG Rule 1.1.1 Non-text content
4 participants
0