Skip to content

docs(examples): use button for navbar dropdown toggle#42452

Open
TheDerbiedOne wants to merge 1 commit into
twbs:mainfrom
TheDerbiedOne:fix/navbars-dropdown-toggle-button
Open

docs(examples): use button for navbar dropdown toggle#42452
TheDerbiedOne wants to merge 1 commit into
twbs:mainfrom
TheDerbiedOne:fix/navbars-dropdown-toggle-button

Conversation

@TheDerbiedOne
Copy link
Copy Markdown

Fixes #40995

Updates the navbar examples to use a <button class="nav-link dropdown-toggle" type="button"> instead of an <a href="#"> for the dropdown toggle, avoiding docs that recommend an unsemantic placeholder link.

@fulldecent
Copy link
Copy Markdown
Contributor

Thank you for sharing.

Can you please confirm that you have exhaustively searched the entire code base and that no a.dropdown-toggle remain?

@TheDerbiedOne
Copy link
Copy Markdown
Author

Thanks — I double-checked.

I searched the repo for <a ... dropdown-toggle ...> and there are still a number of occurrences (including in tests and other docs/examples). This PR intentionally keeps scope narrow to the navbar docs example discussed in #40995, replacing that dropdown toggle anchor with a semantic <button class="nav-link dropdown-toggle" type="button" ...>.

If you’d like, I can follow up with a separate PR to convert the remaining docs examples (and/or tests), but it’d be a broader sweep than this single-example fix.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

a.dropdown-toggle should be button.dropdown-toggle

3 participants