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

fix: n-modal has log warnings of console when use aria-hidden attribute. #6569

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

puxiao
Copy link
Contributor

@puxiao puxiao commented Nov 27, 2024

Fixes #6436

我注意到之前有人提交了一个 PR #6463
他用 inert 替换 aria-hidden,这样做会让 div 中的 onClick 事件失效的。

https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inert

The inert attribute can be added to sections of content that should not be interactive. When an element is inert, it along with all of the element's descendants, including normally interactive elements such as links, buttons, and form controls are disabled because they cannot receive focus or be clicked.


我建议是直接就删除 aria-hidden,antd 组件库也是这样做的:#fix: Modal a11y warning issue

Copy link

vercel bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
naive-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 27, 2024 9:00am

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

Successfully merging this pull request may close these issues.

Opening the Modal causes an error in the Chrome console: aria-hidden
1 participant