Skip to content

DataTable MultiSelect: Accessibility - The 'aria-controls' (for ARIA 1.2) or the 'aria-owns' (for ARIA 1.0) attribute of the expanded combobox must reference a valid popup 'id' value #8239

@Aryan3902

Description

@Aryan3902

Describe the bug

Running IBM Accessibility Checker on any DataTable with Multiselect inline filter gives the following violation:

The 'aria-controls' attribute of the expanded combobox is missing
Element location

<input
    value="Canceled"
    readonly=""
    data-pc-section="input"
    tabindex="0"
    aria-expanded="true"
    role="combobox"
    type="text">

What to do
Code the combobox as in the ARIA 1.2 example belowAnd, set the value of the combobox aria-controls attribute to the id value of an element with role="listbox"Or, if using the ARIA 1.0 style of combobox, update the value of the aria-owns attribute of the combobox to reference the id value of the combobox popup element

<label for="tag_combo">Tag</label>
  <input type="text" id="tag_combo"
      role="combobox" aria-autocomplete="list"
      aria-haspopup="listbox" aria-expanded="true"
      aria-controls="popup_listbox" aria-activedescendant="selected_option">
  <ul role="listbox" id="popup_listbox">
   <li role="option">Zebra</li>
   <li role="option" id="selected_option">Zoom</li>
  </ul>

Note: example code includes material copied from or derived from W3C, ARIA Authoring Practices Guide (APG) . Copyright © [2018-2021] W3C® (MIT, ERCIM, Keio, Beihang).

Rule ID: combobox_popup_reference
Reason ID: Fail_1.2_missing_controls

Image

Reproducer

No response

System Information

Irrelevant

Steps to reproduce the behavior

  1. Create a datatable as mentioned in https://primereact.org/datatable/#custom_filter
  2. Run IBM Accessibility Checker Scan
  3. Check violations

Expected behavior

No response

Metadata

Metadata

Assignees

Labels

Component: AccessibilityIssue or pull request is related to WCAG or ARIA

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions