Skip to content

Accessibility: Missing role="listbox" on dropdown container for combobox button #2030

@riccardinhocala

Description

@riccardinhocala

Hello,
I'm using intl-tel-input in a project that undergoes strict accessibility checks (IBM Equal Access, WAVE, etc.), and I noticed an issue related to ARIA roles:

When using the component, the selected country button is rendered with:

<button
  title="Italy"
  role="combobox"
  aria-controls="iti-1__dropdown-content"
  aria-haspopup="true"
  aria-expanded="false"
  aria-label="Selected country"
  type="button"
>

However, the dropdown element it controls (#iti-1__dropdown-content) is rendered without a valid ARIA role, like:

<div id="iti-1__dropdown-content" role="">

According to ARIA Authoring Practices, a combobox must control a popup with one of the following roles: listbox, grid, tree, dialog

Without this, screen readers and assistive technologies may not behave correctly, and accessibility testing tools flag it as a failure.

Expected behavior:

The dropdown container (#iti-1__dropdown-content) should have:

role="listbox"

Additionally, the button should ideally use:

aria-haspopup="listbox"

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions