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

Accessibility issue: aria-required-children issue for antd Tree #44667

Open
MiGupta2702 opened this issue Sep 6, 2023 · 4 comments
Open

Accessibility issue: aria-required-children issue for antd Tree #44667

MiGupta2702 opened this issue Sep 6, 2023 · 4 comments

Comments

@MiGupta2702
Copy link

Reproduction link

Edit on CodeSandbox

Steps to reproduce

antd tree has accessibility issues.

const { DirectoryTree } = Tree;

it says,

Path
.ant-tree
Snippet

Related paths input .ant-tree-treenode-switcher-open .ant-tree-treenode-switcher-close How to fix Fix ONE of the following: Element has children which are not allowed: input[aria-label], div[aria-grabbed] Element uses aria-busy="true" while showing a loader

What is expected?

Fix Accessibility issues for antd Tree

What is actually happening?

antd tree has accessibility issues.

Environment Info
antd 4.24.14
React 17.0.2
System Windows
Browser Version 115.0.1901.203
@MiGupta2702
Copy link
Author

Can you fix Accessibility related issues for antd Tree

@MadCcc
Copy link
Member

MadCcc commented Sep 13, 2023

What do you expect in TreeNode dom?

@MiGupta2702
Copy link
Author

Ensures elements with an ARIA role that require child roles contain them
Rule name
aria-required-children

Path
.ant-tree

Related paths
input
.ant-tree-treenode-switcher-open.ant-tree-treenode-leaf-last[draggable="false"]:nth-child(1)
.ant-tree-treenode-switcher-open.ant-tree-treenode-leaf-last[draggable="false"]:nth-child(2)
.ant-tree-treenode-switcher-open.ant-tree-treenode-leaf-last[draggable="false"]:nth-child(3)
.ant-tree-treenode-switcher-open.ant-tree-treenode-leaf-last[draggable="false"]:nth-child(4)
.ant-tree-treenode-switcher-close

How to fix
Fix ONE of the following:
Element has children which are not allowed: input[aria-label], div[aria-grabbed]
Element uses aria-busy="true" while showing a loader

Getting this Accessibility issue for antd Tree

@ntlongctt
Copy link

any update on this issue?

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

No branches or pull requests

3 participants