Description
On the new-submission Files step, keyboard focus is lost after a file is uploaded or removed. Screen reader users are not told that the file list changed.
This is a keyboard / WCAG 2.4.3 (Focus Order) and 4.1.3 (Status Messages) problem in workflow-files.
What is wrong today
- After an upload, focus does not move to the new file. Keyboard users have to find the new row themselves.
- After Remove, SweetAlert2 restores focus to the button that was just destroyed (
returnFocus defaults to true). Focus falls back to <body> and the page can jump to the top.
- There is no status announcement when a file is added or removed.
Expected
- After upload, focus moves to that file’s Description field.
- After Remove, if other files remain, focus moves to an adjacent file’s Remove button. If it was the last file, focus moves to the file picker (
#file-multiple-input).
- SweetAlert2 does not try to restore focus to the deleted button (
returnFocus: false).
- A visually hidden
aria-live="polite" region announces "<fileName> uploaded successfully." and "<fileName> removed.".
Steps to reproduce
- Start a new submission and go to the Files step.
- Upload a file from the keyboard (or the file picker). Focus is not on the new Description field.
- Tab to Remove, confirm the SweetAlert. Focus is on the document body (often the page scrolls to the top) instead of the remaining file or the file picker.
Environment
pass-ui, new-submission wizard, Files step (app/components/workflow-files).
Description
On the new-submission Files step, keyboard focus is lost after a file is uploaded or removed. Screen reader users are not told that the file list changed.
This is a keyboard / WCAG 2.4.3 (Focus Order) and 4.1.3 (Status Messages) problem in
workflow-files.What is wrong today
returnFocusdefaults to true). Focus falls back to<body>and the page can jump to the top.Expected
#file-multiple-input).returnFocus: false).aria-live="polite"region announces"<fileName> uploaded successfully."and"<fileName> removed.".Steps to reproduce
Environment
pass-ui, new-submission wizard, Files step (
app/components/workflow-files).