问题:
Element UI version
2.15.14
OS/Browsers version
chrome
Vue version
2.7.16
Steps to reproduce
点击任意一个选择框,控制台报
Blocked aria-hidden on a element because the element that just received 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 Accessible Rich Internet Applications (WAI-ARIA) 1.3.
解决方案:
看MDN上对aria-hidden解释是:不应该在可以获得焦点的元素上使用 aria-hidden="true"。此外,由于此属性会被元素的子元素继承,因此不应该添加到可获得焦点元素的父元素或祖先元素上。
是谷歌浏览器升级导致的
修改样式
:deep(input[aria-hidden="true"]) {
display: none !important;
}
:deep(.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner){
box-shadow: none;
}