在使用vue2+element时,使用了el-cascader,每次选择都报以下错误:
在这里插入图片描述

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: input
Ancestor with aria-hidden:  <input type=​"radio" aria-hidden=​"true" tabindex=​"-1" class=​"el-radio__original" value=​"110000,110100,110101">​

aria-hidden属性用于隐藏元素及其所有子元素,使其不被屏幕阅读器等辅助技术所访问。然而,当使用aria-hidden隐藏的元素或其祖先元素中包含了当前获得焦点的元素时,就会出现问题,因为这可能使得辅助技术的用户无法得知哪个元素是当前焦点所在。

解决办法:

//在全局设置
input[aria-hidden=true]{
    display: none !important;
}

更多推荐