ant-design Autocomplete component - Required ARIA attributes must be provided

hsgswve4  于 5个月前  发布在  其他
关注(0)|答案(5)|浏览(100)

https://ant.design/components/auto-complete#examples

Steps to reproduce

Type an available option in Typeahead

What is expected?

Typed option from the Typeahead dropdown should have aria-selected set to true

What is actually happening?

Typed option from the Typeahead dropdown should have aria-selected set to false
| Environment | Info |
| ------------ | ------------ |
| antd | undefined |
| React | Not react specific |
| System | Ubuntu 22.04.3 LTS |
| Browser | Chrome Version 122.0.6261.111 (Official Build) (64-bit) |

Select component is working fine but Typeahead lacks this accessibility.

z3yyvxxp

z3yyvxxp1#

@sreeram-s-zessta I can't see what is the issue exactly, I see that Autocomplete component has already araia-selected prop
You can see here

v2g6jxz6

v2g6jxz62#

i try autocomplete, aria-selected="false" indeed

zi8p0yeb

zi8p0yeb3#

@Othman2001 Yes the aria-selected attribute is available but the problem is the value of it. The value of the selected option is not updating to true.

bybem2ql

bybem2ql4#

Should add type [aria-${string}]?: string ?

xv8emn3q

xv8emn3q5#

@MadCcc I am expecting aria-selected attribute on Typeahead options to have the right status true/false based on the options selected in the Typeahead. Currently, the options have this attribute but the value is not updating to true even though a particular option is selected.

相关问题