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
  • #16204
Closed
Open
Issue created Apr 01, 2015 by Administrator@rootContributor

List group with anchors and buttons semantic html and accessibility

Created by: mtscout6

I'm reviewing pull request react-bootstrap/react-bootstrap#467 and could use some input on a clear direction to take the ListGroup and ListGroupItem React components we are putting together there.

When working with a list-group component the docs highlight two major code paths using either div or ul which lead me to this example:

<div>
  <ul class="list-group">
    <li class="list-group-item">Dapibus ac facilisis in</li>
    <li class="list-group-item">Cras sit amet nibh libero</li>
    <li class="list-group-item">Porta ac consectetur ac</li>
    <li class="list-group-item">
      <a href='#'>Vestibulum at eros</a>
    </li>
  </ul>
  <div class="list-group">
    <a href="#" class="list-group-item">Dapibus ac facilisis in</a>
    <a href="#" class="list-group-item">Cras sit amet nibh libero</a>
    <a href="#" class="list-group-item">Porta ac consectetur ac</a>
    <span class="list-group-item">Porta ac consectetur ac</span>
    <button class="list-group-item">Vestibulum at eros</button>
  </div>
</div>

Which produces:

I thought about using a vertical button group, but the background colors for contextual items are darker with the btn-group.

Have you considered having buttons within a list-group styled the same as the anchors? Or on the flip side having anchors and buttons that are direct children of an li appear the same as the div approach?

Assignee
Assign to
Time tracking