Skip to content

The aria-controls attribute isn't returned by getRootProps #1271

@loicplaire

Description

@loicplaire

Description

The createAutocomplete function getRootProps() getter doesn't return the aria-controls attribute.

This is flagged as a violation by Axe Core.

image

Reproduction

You can reproduce this issue in the Algolia docs: https://www.algolia.com/doc/.

Steps

  1. Go to https://www.algolia.com/doc/
  2. Click on "Search for documentation" trigger button
  3. Search for any keyword that displays results
  4. Use the Axe DevTools browser extension to run a scan and see the "Required Aria attributes must be provided" issue (as per the screenshot above).

Expected behavior

Is it a false positive because the aria-controls attribute is returned by the getInputProps getter?

Or should it also be set on the combobox (returned by getRootProps)?

Environment

  • Autocomplete version: 1.17.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions