Skip to content

Ranking question: role="list" container without list items (aria-required-children) #3840

Open

Description

@AndyScherzinger

Describe the bug
In the submit view, a ranking question has a container with role="list" whose direct children are not list items. axe reports this as aria-required-children (critical, WCAG 1.3.1 Info and Relationships). Screen readers announce a list with no items, followed by unrelated content.

In src/components/Questions/QuestionRanking.vue, div.question__content has role="list". Its children are div.ranking-unranked and div.ranking-ranked, which hold their own <ul> (rendered by TransitionGroup tag="ul") and a label paragraph. The real lists are the inner <ul> elements, and the ranked items additionally set role="listitem" on <li>.

To Reproduce

  1. Create a form with a ranking question with two or more options.
  2. Open the form to answer it (/apps/forms/<hash>/submit).
  3. Run axe on the page, or inspect the accessibility tree of the question.
  4. axe reports aria-required-children on div.question__content.

Expected behavior
The outer container is not a list. role="group" keeps its aria-labelledby, aria-describedby, aria-errormessage and aria-invalid. The two inner <ul> elements stay the lists, and each one is named after its section ("Your ranking", and the unranked pool). The redundant role="listitem" on <li> can go.

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 ranking 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