Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong aria-labelledby generated by tab.js #38222

Closed
3 tasks done
janbensch opened this issue Mar 13, 2023 · 0 comments · Fixed by #38223
Closed
3 tasks done

Wrong aria-labelledby generated by tab.js #38222

janbensch opened this issue Mar 13, 2023 · 0 comments · Fixed by #38223

Comments

@janbensch
Copy link
Contributor

Prerequisites

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants