Skip to content

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

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
  2. added theissue type on Nov 16, 2026
  3. added
    1. to developAccepted and waiting to be taken care of
    and removed
    0. Needs triagePending approval or rejection. This issue is pending approval.
    on Nov 16, 2026
  4. joshuaallgaier2-cmd commented on Nov 16, 2026

    @joshuaallgaier2-cmd

    Hi! I'd like to work on this. I'll give the upload NcButton an aria-label that matches the singular/plural file setting and covers the editor case, so axe's button-name rule passes, with a component test. Could you assign it to me?

  5. AndyScherzinger commented on Nov 16, 2026

    @AndyScherzinger
    MemberAuthor

    @joshuaallgaier2-cmd there is already a PR at #3902

  6. added 2 commits that reference this issue on Nov 16, 2026
    428c38c
    3523117
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

    1. to developAccepted and waiting to be taken care ofa11yrelated to accessibilitybugSomething isn't workinggood first issueGood for newcomers

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions