Accessiblity of Breadcrumb

RoleAttributeElementUsage
aria-label=BreadcrumbnavProvides a label that describes the type of navigation provided in the nav element.
aria-current=pageaApplied to the last link in the set to indicate that it represents the current page.

<nav aria-label="Breadcrumb" class="breadcrumb">
  <ol>
    <li>
      <a href="../../../..">
        WAI-ARIA Authoring Practices Guide (APG)
      </a>
    </li>
    <li>
      <a href="../../../">
        Patterns
      </a>
    </li>
    <li>
      <a href="../../">
        Breadcrumb Pattern
      </a>
    </li>
    <li>
      <a href="" aria-current="page">
        Breadcrumb Example
      </a>
    </li>
  </ol>
</nav>

Accessibility Features

  • The set of links is structured using an ordered list .
  • nav element labeled Breadcrumb identifies the structure as a breadcrumb trail and makes it a navigation landmark so that it is easy to locate.
  • To prevent screen reader announcement of the visual separators between links, they are added via CSS:
    • The separators are part of the visual presentation that signifies the breadcrumb trail, which is already semantically represented by the nav element with its label of Breadcrumb. So, using a display technique that is not represented in the accessibility tree used by screen readers prevents redundant and potentially distracting verbosity.
    • Each link has a border on one side that is skewed with the CSS’ transform property so it resembles a slash.

Breadcrumb Example | APG | WAI | W3C

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值