使用vue中出现的相关问题
ant-design-vue 4.1.2使用a-modal组件aria-hidden="true"报错
chrome高版本接浏览器会出现这个问题
报错信息:
shell
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.
Element with focus: div
Ancestor with aria-hidden: <div tabindex="0" aria-hidden="true" style="width: 0px; height: 0px; overflow: hidden; outline: none;"></div>不能在获得焦点的元素或其祖先上使用 aria-hidden
解决方法:
css
.ant-modal div[aria-hidden='true'] {
display: none !important;
}暂时将Modal中该属性的元素隐藏掉