Skip to content

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

Open
@mirari

Description

@mirari

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状态。

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions