Skip to content

DropdownSelect and DropdownCascader silently override caller's aria-label #91

Description

@kemuru

Files: src/lib/dropdown/select/index.tsx, src/lib/dropdown/cascader/index.tsx

The bug:

<AriaSelect className={...} {...props} aria-label={label ?? "Select"}>
aria-label is set after {...props}, so caller-supplied aria-label is dropped. The only way to set a real accessible name is the label prop, which also renders a visible , which doesn't fit icon-only filter UIs.

Workaround currently in web repo: a LabeledDropdown wrapper using aria-labelledby (which the spread does forward) pointing at a visually-hidden span.

Suggested fix: either move aria-label before {...props} (so caller wins), or only apply the default when no labelling prop (aria-label, aria-labelledby, or label) is provided.

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