Skip to content

File question: the upload button has no accessible name #3839

Open

Description

@AndyScherzinger

Describe the bug
The upload button of a file question has no accessible name. Screen readers announce it as "button", and nothing tells the user what it does (WCAG 4.1.2 Name, Role, Value). axe reports it as button-name (critical).

In src/components/Questions/QuestionFile.vue the NcButton next to the hidden file input only has an icon (IconUpload / IconUploadMultiple) and no aria-label. The visible text "Add new file as answer" belongs to the <label> around the hidden <input type="file">, not to the button.

In the editor the button is also disabled (:disabled="!readOnly || …"), so it shows up there as an unnamed, disabled button.

To Reproduce

  1. Create a form with a file question.
  2. Open the form to answer it (/apps/forms/<hash>/submit).
  3. Inspect the upload button with the browser's accessibility tree, or run axe on the page.
  4. The button has no name.

Expected behavior
The button has a name, for example :aria-label="t('forms', 'Upload a file')", or 'Upload files' when several files are allowed. Alternatively, the button is hidden from assistive technology when the labelled file input is the real control.

Nextcloud (please complete the following information):

  • Nextcloud-Version: master
  • Forms-Version: main (5.5.0-dev)

Additional context
Found while reviewing #3123 (conditional questions). It is not caused by that PR: a top-level file question on main has the same problem.

Activity

  1. added
    bugSomething isn't working
    0. Needs triagePending approval or rejection. This issue is pending approval.
    a11yrelated to accessibility
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending approval or rejection. This issue is pending approval.a11yrelated to accessibilitybugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions