Skip to content

Combobox Accessibility #3859

Open
Open
@cogwizzle

Description

@cogwizzle

Description

When I inspect the HTML of the combobox output I expect to see:

  • An input with the role of select (or maybe button?).
  • A role of none when using autocomplete behavior. (datalist is not native behavior).
    Instead I see:
  • A duplicated aria-labeledby aria attribute that should already be handled by the real label component.
  • A role of "autocomplete" regardless if the combobox can be typed into.

Link to Reproduction

https://paste.twilio.design/components/combobox

Steps to reproduce

  1. Go to 'https://paste.twilio.design/components/combobox#basic-combobox'
  2. Inspect Element.
  3. Go to 'https://paste.twilio.design/components/combobox#autocomplete-combobox'
  4. Inspect Element.

Paste Core Version

latest

Browser

Google Chrome 123.0.6312.124

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

If we build these non native components that replicate native elements we need to ensure that we make it accessible to how users normally interact with these components.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: ComponentsRelated to the component library (core) of this systemStatus: Pls CRThis PR is ready for Code ReviewsType: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions