Skip to content

Commit

Permalink
fix: add aria label for removing attachment
Browse files Browse the repository at this point in the history
  • Loading branch information
gosiexon-zen committed Nov 14, 2024
1 parent a9a12f0 commit 452cc68
Show file tree
Hide file tree
Showing 7 changed files with 40,277 additions and 70 deletions.
32 changes: 31 additions & 1 deletion assets/flash-notifications-bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,488 changes: 1,446 additions & 42 deletions assets/new-request-form-bundle.js

Large diffs are not rendered by default.

3,482 changes: 3,481 additions & 1 deletion assets/new-request-form-translations-bundle.js

Large diffs are not rendered by default.

35,293 changes: 35,269 additions & 24 deletions assets/shared-bundle.js

Large diffs are not rendered by default.

35 changes: 34 additions & 1 deletion assets/wysiwyg-bundle.js

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion src/modules/new-request-form/fields/attachments/FileListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,17 @@ export function FileListItem({

return (
<FileList.Item>
<File type="generic" title={fileName} onKeyDown={handleFileKeyDown}>
<File
type="generic"
title={fileName}
tabIndex={0}
aria-label={t(
"new-request-form.attachemnts.file",
"File: {{fileName}}, press delete to remove",
{ fileName }
)}
onKeyDown={handleFileKeyDown}
>
{file.status === "pending" ? (
<>
<FileNameWrapper>{fileName}</FileNameWrapper>
Expand Down
5 changes: 5 additions & 0 deletions src/modules/new-request-form/translations/en-us.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ parts:
title: "[A11Y] Hidden label for screen readers for the upload attachment progress bar. {{fileName}} will be replaced by file name, e.g., [image.png]. Alternative English if you encounter declension issues: [Uploading the file {{fileName}}]"
screenshot: "https://drive.google.com/file/d/1Y6yeqp3fbfJbuq7tT8VutsLa80GZju-V/view?usp=drive_link"
value: "Uploading {{fileName}}"
- translation:
key: "new-request-form.attachemnts.file"
title: "[A11Y] Hidden label for screen readers informing how they can remove the file with keyboard navigation. {{fileName}} will be replaced by file name, e.g., [image.png]. Alternative English if you encounter declension issues: [Press Delete to remove the file {{fileName}}]"
screenshot: "https://drive.google.com/file/d/1JFVE2twzUkg-U6gGAs2EHqD-3jPvtJDA/view?usp=drive_link"
value: "File: {{fileName}}, press delete to remove"
- translation:
key: "new-request-form.submit"
title: "Submit button for the New Request Form"
Expand Down

0 comments on commit 452cc68

Please sign in to comment.