Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #30338
Closed
Open
Issue created Mar 05, 2020 by Administrator@rootContributor

tabs - accessibility issue when using ul/li semantic

Created by: Lausselloic

Hello,

I just face a small accessibility error on tabs with content when using ul/li semantic and role="tablist" as explain as default on documentation https://getbootstrap.com/docs/4.4/components/navs/#javascript-behavior

By setting role="tablist" onto the ul element, remove it's defaut html5 role list and so li's children are now orphan (aXe and other accessibility tools are raising an error)

I've seen the great job about keyboard handler by @patrickhlauke on https://github.com/twbs/bootstrap/pull/28927 but nothing about that semantic warning

There's two options :

  1. Just replace ul and li by div element and keep the current 3 levels tablist->li->tab in documentation
  2. Clearly simplify tabs usage and keep as simple as possible like the one with nav
<nav>
  <div class="nav nav-tabs" id="nav-tab" role="tablist">
    <a class="nav-item nav-link active" id="nav-home-tab" data-toggle="tab" href="#nav-home" role="tab" aria-controls="nav-home" aria-selected="true">Home</a>
    <a class="nav-item nav-link" id="nav-profile-tab" data-toggle="tab" href="#nav-profile" role="tab" aria-controls="nav-profile" aria-selected="false">Profile</a>
    <a class="nav-item nav-link" id="nav-contact-tab" data-toggle="tab" href="#nav-contact" role="tab" aria-controls="nav-contact" aria-selected="false">Contact</a>
  </div>
</nav>

by the way at time developer can avoid that error by not using ul/li

Let me know if I could help by making a PR on V4 and or V5

Assignee
Assign to
Time tracking