Accessibility issues with Form Upload #232
Labels
accessibility
Accessibility can be improved
in treatment
wcag
There an issue with WCAG 2.1 AA compliancy
Erik and Roel reported back these issues.
1.1.1 Non-text Content
1.3.1 Info and Relationships
<input>
inside a<button>
. All semantics of the input are lost this way and the role of the element is lost for AT users.Fix: make sure the focused element has the right role.
Fix: use
aria-describedby
to make sure AT can also notice the description messageFix: use the word error in a message and put
aria-invalid
on the input.Recommendations
"Upload as a button" has a
span
to label thebutton
. The use ofaria-labelledby
is unnecessary as the content of abutton
forms the accessible name of thebutton
.Clicking the
label
doesn't put the focus on the upload but triggers the actual upload. This is unusual behaviour.The file list/queue is unclear both visually and in code. Suggestion to mark it up as a list of files with
<ul>
and<li>
, and to add a heading to indicate the purpose of the list.The "Custom upload" features two buttons that have no clear visual separation. It is also unclear what the difference in functionality is , from the text on the buttons. The upload field also states "click to upload" which seems to overlap with the button labelled "upload".
The optional description message is after a rather large input field. It is easy to miss for users who are zoomed in. It would get more attention (at the right moment) between label and input.
An upload can fail due to a wrong mime type and there seems to be a maximum file size as well. These kind of criteria sound more like instructions than errors and could be placed inside the description message.
A message in all caps like "INVALID_MIME_TYPE" is read by AT like an abbreviation and is not human readable. Consider writing actual error messages.
The use of a close button with a file or error message is unclear as it is not unique or visually labelled.
The text was updated successfully, but these errors were encountered: