Skip to content

Commit

Permalink
fix: 元素可以获得焦点时, 不应该采用 aria-hidden 属性对辅助技术隐藏
Browse files Browse the repository at this point in the history
  • Loading branch information
pany-ang committed Nov 12, 2024
1 parent 396b8fa commit b3d935c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/SvgIcon/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const symbolId = computed(() => `#${props.prefix}-${props.name}`)
</script>

<template>
<svg class="svg-icon" aria-hidden="true">
<svg class="svg-icon">
<use :href="symbolId" />
</svg>
</template>
Expand Down

2 comments on commit b3d935c

@Mique2011
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除后依然出现这个错误,在左边栏使用图标显示的时候出现。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

@pany-ang
Copy link
Member Author

@pany-ang pany-ang commented on b3d935c Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在最新的仓库代码中我无法复现你提到的情况,如果你这边在最新代码基础下还是能复现可以提交一个 issue,并提供一下复现步骤 @Mique2011

Please sign in to comment.