Skip to content

Autocompletion option descriptions not announced by screen readers #1625

@muchktom

Description

@muchktom

Describe the issue

Autocompletion option descriptions not announced by screen readers

Description

When autocompletion list items contain additional descriptions, these descriptions are not announced by screen readers. The reason is that there is no semantic connection between the description and the corresponding autocompletion option.

As a result, screen readers only announce the label (for example, “hello”) but not the additional detail (for example, “world”), leaving out critical context.

Image

Steps to Reproduce

  1. Visit the CodeMirror autocompletion demo: https://codemirror.net/examples/autocompletion/
  2. Trigger the autocompletion (Ctrl + Space) and navigate through the options with a screen reader enabled.
  3. Observe that any additional details attached to options are not announced.

Expected Behavior

When a completion option has an additional description, the screen reader should announce both the label and the description.

Actual Behavior

Only the label is announced, while the description is ignored.

Suggested Fix

Associate the description with its option using aria-describedby to connect the detail with the option element.

Browser and platform

Chrome, MacOS

Reproduction link

No response

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