Skip to content

[Feature Request] TreeSelect: Add "labelInAriaLive"-property for better accessibility #412

Open
@juhoValkonen

Description

@juhoValkonen

What problem does this feature solve?

If the user moves between TreeSelect options using arrow keys, the screenreader will always read out the value of the active node. It would be much better for accessibility (and more flexible), if I as a developer could decide to use labels for aria-live content instead of the values.

What does the proposed API look like?

New prop would be labelInAriaLive, and it would be false by default. This prob would then be used to decide whether to use the value or label of the selected item, when rendering the aria-live tag of the component.

Using the component with the implemented feature:

<TreeSelect
        labelInAriaLive={true} // This is the new prop
        treeDefaultExpandAll
        treeData={[{ value: 'parent', label: 'parent-label', children: [{ value: 'child', label: 'child-label' }] }]}
        multiple
      />

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