React-select 的辅助功能 ARIA 问题

Kir*_*idi 5 accessibility autocomplete wai-aria react-select

我们正在我们的一个项目中使用反应选择组件并尝试解决可访问性问题。目前,无法向具有 aria-autocomplete="list" 属性的输入元素提供所需的 aria 属性。

https://www.digitala11y.com/aria-autocomplete-properties/

上面是我们想要实现的目标的参考链接。以下是上述链接中的短篇故事。

If an element has aria-autocomplete set to list or both, authors MUST ensure both of the following conditions are met:

The element has a value specified for aria-controls that refers to the element that contains the collection of suggested values.
Either the element or a containing element with role combobox has a value for aria-haspopup that matches the role of the element that contains the collection of suggested values.
Run Code Online (Sandbox Code Playgroud)

我打开了一个 PR,以添加将 ARIA 属性添加到输入元素的功能。https://github.com/JedWatson/react-select/pull/4132

但我想检查一下我是否遗漏了一些东西,是否有人已经做过这方面的工作。如果您需要任何其他详细信息,请告诉我。