Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
juhoValkonen opened this issue May 24, 2022 · 1 comment

Comments

@juhoValkonen
Copy link

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
      />
@juhoValkonen juhoValkonen changed the title TreeSelect: Add "labelInAriaLive"-property for better accessibility [Feature Request] TreeSelect: Add "labelInAriaLive"-property for better accessibility May 24, 2022
@juhoValkonen
Copy link
Author

Now there's a PR for this feature: #413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant