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

点击关闭按钮后,Chrome浏览器弹出aria-hidden错误 #648

Open
mirari opened this issue Jan 2, 2025 · 2 comments
Open

点击关闭按钮后,Chrome浏览器弹出aria-hidden错误 #648

mirari opened this issue Jan 2, 2025 · 2 comments

Comments

@mirari
Copy link
Contributor

mirari commented Jan 2, 2025

Viewer version

1.11.7

Link to minimal reproduction

https://fengyuanchen.github.io/viewerjs/

Steps to reproduce

打开控制台,在官网demo上点击图片预览,并关闭窗口即可复现。

What is expected?

控制台无警告或报错

What is actually happening?

错误信息为:

Blocked aria-hidden on an element because its descendant retained focus. The focus must not be hidden from assistive technology users. Avoid using aria-hidden on a focused element or its ancestor. Consider using the inert attribute instead, which will also prevent focus. For more details, see the aria-hidden section of the WAI-ARIA specification at https://w3c.github.io/aria/#aria-hidden.

System Info

Chrome浏览器131.0.6778.205

Any additional comments?

点击图片背景时的退出浏览没有报错,只有点击右上角关闭按钮会触发。
推测是点击按钮的行为触发了焦点,但外部容器在关闭后处于aria-hidden状态。

@mirari
Copy link
Contributor Author

mirari commented Jan 2, 2025

搜了下这个问题在各UI库中普遍存在,但应该不能通过粗暴删除aria-hidden来解决
element-plus/element-plus#19049

@mirari mirari changed the title 点击关闭按钮后,浏览器弹出aria-hidden错误 点击关闭按钮后,Chrome浏览器弹出aria-hidden错误 Jan 2, 2025
@Nymph572600723
Copy link

同这个问题,我的触发是使用vue-router进行登出跳转离开当前页面时出现,跳转失败;
浏览器版本:131.0.6778.205(正式版本) (64 位)
同时我这个是一个electron项目,在electron窗口中无这个问题;
electron版本:3.0.0

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

No branches or pull requests

2 participants