Skip to content

[stable5.4] fix(a11y): give the file upload button an accessible name - #3922

Merged
Chartman123 merged 2 commits into
stable5.4from
backport/3902/stable5.4
Nov 18, 2026
Merged

Chartman123 merged 2 commits into
stable5.4from
backport/3902/stable5.4

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 18, 2026

Copy link
Copy Markdown

Backport of PR #3902

v01dst and others added 2 commits November 18, 2026 15:24
The upload button of a file question only holds an icon, so a screen reader
announces it as "button" without saying what it does. axe reports it as
`button-name`, which fails WCAG 4.1.2.

The button now gets an `aria-label`. It says "Upload a file" for a question
that takes one file and "Upload files" when more than one file is allowed.

The visible text "Add new file as answer" stays where it is: it belongs to the
label of the hidden file input, not to the button.

Fixes #3839

Signed-off-by: v01dst <v01dst@users.noreply.github.com>
Assisted-by: OpenCode:MiniMax-M3.1-Flash
The name of the upload button now comes from n(), so each language gets
the plural forms it needs for the number of files a question allows.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@backportbot
backportbot Bot requested a review from Chartman123 November 18, 2026 15:24
@backportbot backportbot Bot added bug Something isn't working 3. to review Waiting for reviews a11y related to accessibility labels Nov 18, 2026
@backportbot backportbot Bot added this to the 5.4.3 milestone Nov 18, 2026
@backportbot backportbot Bot added bug Something isn't working 3. to review Waiting for reviews a11y related to accessibility labels Nov 18, 2026
@Chartman123
Chartman123 merged commit 8ab0947 into stable5.4 Nov 18, 2026
42 checks passed
@Chartman123
Chartman123 deleted the backport/3902/stable5.4 branch November 18, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews a11y related to accessibility bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants