我应该在bootstrap选项卡中使用带有aria-labelledby的aria-controls吗?

时间:2016-11-16 12:55:09

标签: html html5 twitter-bootstrap twitter-bootstrap-3 wai-aria

我一直在阅读他们official documentation的引导标签。建议的标记为:

<div>

  <!-- Nav tabs -->
  <ul class="nav nav-tabs" role="tablist">
    <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Home</a></li>
    <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a></li>
    <li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a></li>
    <li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a></li>
  </ul>

  <!-- Tab panes -->
  <div class="tab-content">
    <div role="tabpanel" class="tab-pane active" id="home">...</div>
    <div role="tabpanel" class="tab-pane" id="profile">...</div>
    <div role="tabpanel" class="tab-pane" id="messages">...</div>
    <div role="tabpanel" class="tab-pane" id="settings">...</div>
  </div>

</div>

在tabpanels上,bootstrap不使用aria-labelledby属性。但是{2}他们在aria-labelledby上使用了tabpanel。所以我的问题是:

  • 我是否应该在引导标签中使用带有aria-labelledby的aria-controls,以使其更适合屏幕阅读器?

0 个答案:

没有答案