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

chore: Select virtual=false will bind to real element for a11y #39550

Merged
merged 4 commits into from Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/select/index.en-US.md
Expand Up @@ -177,3 +177,5 @@ Note: `listItemHeight` and `listHeight` are internal props. Please only modify w
### Why a11y test report missing `aria-` props?

Select only create a11y auxiliary node when operating on. Please open Select and retry. For `aria-label` & `aria-labelledby` miss warning, please add related prop to Select with your own requirement.

Default virtual scrolling will create a mock element to simulate an accessible binding. If a screen reader needs to fully access the entire list, you can set `virtual={false}` to disable virtual scrolling and the accessibility option will be bound to the actual element.
2 changes: 2 additions & 0 deletions components/select/index.zh-CN.md
Expand Up @@ -178,3 +178,5 @@ Select 当失去焦点时会关闭下拉框,如果你可以通过阻止默认
### 为何无障碍测试会报缺失 `aria-` 属性?

Select 无障碍辅助元素仅在弹窗展开时创建,因而当你在进行无障碍检测时请先打开下拉后再进行测试。对于 `aria-label` 与 `aria-labelledby` 属性缺失警告,请自行为 Select 组件添加相应无障碍属性。

Select 虚拟滚动会模拟无障碍绑定元素。如果需要读屏器完整获取全部列表,你可以设置 `virtual={false}` 关闭虚拟滚动,无障碍选项将会绑定到真实元素上。
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -120,7 +120,7 @@
"copy-to-clipboard": "^3.2.0",
"dayjs": "^1.11.1",
"lodash": "^4.17.21",
"rc-cascader": "~3.7.0",
"rc-cascader": "~3.8.0",
"rc-checkbox": "~2.3.0",
"rc-collapse": "~3.4.2",
"rc-dialog": "~9.0.2",
Expand All @@ -140,7 +140,7 @@
"rc-rate": "~2.9.0",
"rc-resize-observer": "^1.2.0",
"rc-segmented": "~2.1.0",
"rc-select": "~14.1.13",
"rc-select": "~14.2.0",
"rc-slider": "~10.0.0",
"rc-steps": "~6.0.0-alpha.2",
"rc-switch": "~4.0.0",
Expand All @@ -149,7 +149,7 @@
"rc-textarea": "~0.4.5",
"rc-tooltip": "~5.2.0",
"rc-tree": "~5.7.0",
"rc-tree-select": "~5.5.4",
"rc-tree-select": "~5.6.0",
"rc-trigger": "^5.2.10",
"rc-upload": "~4.3.0",
"rc-util": "^5.25.2",
Expand Down