我可以使用如下语法吗
<span class="subheader-uline">My custom emphasised txt</span>
在不违反可访问性规则(WCAG)的情况下,我不打算通过屏幕阅读器导航此自定义标题 - 它纯粹是为了美观。
我尝试使用此语法,它在可访问性中被标记为非法,说明我应该使用我不想做的 h1 - h6 标签。
您可以尝试使用 aria-hidden 从辅助功能 API 中隐藏非交互式内容。
<span class="subheader-uline" aria-hidden="true">My custom emphasised txt</span>