解决 el-radio 控制台报错的问题

问题:

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;
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yusirxiaer

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值