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
  • #38222
Closed
Open
Issue created Mar 13, 2023 by Administrator@rootContributor3 of 3 checklist items completed3/3 checklist items

Wrong aria-labelledby generated by tab.js

Created by: janbensch

Prerequisites

  • I have searched for duplicate or closed issues
  • I have validated any HTML to avoid common problems
  • I have read the contributing guidelines

Describe the issue

In the documention for using tab navigation there is a section describing JavaScript behavior:

https://getbootstrap.com/docs/5.2/components/navs-tabs/#javascript-behavior

In the first sample code all child elements have an explicit aria-labelledby attribute. If you omit it, it gets autogenerated by Bootstrap's JavaScript engine. Unfortunately it gets generated with an additional "#", which is invalid HTML.

Reduced test cases

Example: https://codepen.io/janbensch/pen/QWVmbwO

In the example, the last div got altered. Inserting the generated html in W3C Nu-Checker shows following error. image

What operating system(s) are you seeing the problem on?

Windows, Android, iOS

What browser(s) are you seeing the problem on?

No response

What version of Bootstrap are you using?

v5.2.3

Assignee
Assign to
Time tracking