Sweet Alert2 v7.26.28在DevExpress报表模块中的aria-hidden报错问题
注:目前存在新版本,但暂时无法升级
我在DevExpress报表模块中使用SweetAlert2,操作流程如下:
- 显示SweetAlert弹窗询问报表名称
- 向服务器校验该名称是否已被使用
- 若名称已被占用,显示SweetAlert错误提示弹窗
- 点击确定后重新执行上述流程
- 首次流程完成后点击取消按钮,F12控制台会出现以下错误:
阻止对元素设置aria-hidden,因为刚获得焦点的元素不能对辅助技术用户隐藏。避免在获焦元素或其祖先元素上使用aria-hidden,可考虑改用inert属性,该属性还能阻止焦点。详情见WAI-ARIA规范的aria-hidden章节。
该错误源自SweetAlert2,会影响DevExpress报表仪表盘(错误截图:
)。所有功能正常,仅控制台显示此错误;首次直接点击取消时不会触发该错误。
代码片段
async function promptForNewName() { const result = await swal({ title: "Report Name", text: "Please name your report", showCancelButton: true, input: "text", inputValue: "", confirmButtonText: "Save", showLoaderOnConfirm: false, allowOutsideClick: () => !swal.isLoading(), inputValidator: (value) => !value ? "Please provide a name for your report" : undefined, }); // Handle the case where the cancel button is clicked if (result.dismiss === swal.DismissReason.cancel || !result.value) { return null; } return trimExtraWhiteSpace(result.value); }
请问是否有解决办法,或升级版本能否修复该问题?
内容的提问来源于stack exchange,提问作者tvb2727GPT
相关产品推荐
相关产品推荐

