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: add aria-label for removing attachment in new request form #543

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gosiexon-zen
Copy link
Contributor

@gosiexon-zen gosiexon-zen commented Nov 14, 2024

Description

Added aria-label with information how to remove the attachment while navigating with keyboard.
This A11y issue was reported here: GG-3796
Here is also explanation why we don't make the remove button accessible by tab navigation: https://zendesk.atlassian.net/browse/GG-3796?focusedCommentId=2055655

Screenshots

Checklist

  • 📗 all commit messages follow the conventional commits standard
  • ⬅️ changes are compatible with RTL direction
  • ♿ Changes to the UI are tested for accessibility and compliant with WCAG 2.1.
  • 📝 changes are tested in Chrome, Firefox, Safari and Edge
  • 📱 changes are responsive and tested in mobile
  • 👍 PR is approved by @zendesk/vikings

Copy link

@kubraokcu kubraokcu left a comment

Choose a reason for hiding this comment

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

👍🏼🙌🏼🌐

@kubraokcu kubraokcu added the g11n-approved Commented by Globalization label label Nov 14, 2024
@jgorfine-zendesk jgorfine-zendesk requested a review from a team November 18, 2024 17:08
Copy link
Contributor

@Fredx87 Fredx87 left a comment

Choose a reason for hiding this comment

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

I added a couple of comments, and we also need to wrap the FileListItem components with the FileList component here as shown in the Garden examples: https://66bcf1412f3b1af56ce3fee1--zendeskgarden.netlify.app/components/file-upload#files

<File type="generic" title={fileName} onKeyDown={handleFileKeyDown}>
<File
type="generic"
title={fileName}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we don't need this title anymore

title={fileName}
tabIndex={0}
aria-label={t(
"new-request-form.attachemnts.file",
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: there is a typo in the key (attachemnts)

Copy link
Contributor

@jgorfine-zendesk jgorfine-zendesk left a comment

Choose a reason for hiding this comment

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

Hi @gosiexon-zen, thanks so much for making this change. I just tested it out in my local Guide instance, and I believe it's working as expected:

Screen.Recording.2024-11-20.at.3.35.57.PM.mov

Is there any chance we could update the "Remove file" button (line 74 of FileListItem.tsx) so it includes the file name, like the label for the group does? That way, if a screen reader user uploads multiple files, they'll be able to tell the "Remove" buttons apart, when navigating the page via form controls.

  • Current behavior: "Remove file"
  • Preferred behavior: "Remove file: {{fileName}}"

@gosiexon-zen
Copy link
Contributor Author

Hi @jgorfine-zendesk I applied your suggestions, but I think there should be Stop uploading {{fileName}} for the removing of the currently uploading files and Remove file: {{fileName}} for those which are already uploaded. Let me know if it is ok.

Copy link

@kubraokcu kubraokcu left a comment

Choose a reason for hiding this comment

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

Reapproving 👍🏼🌐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
g11n-approved Commented by Globalization label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants