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

Add missing role="button" in .navbar's .dropdown-toggle #26831

Merged
merged 1 commit into from Jul 9, 2018

Conversation

XhmikosR
Copy link
Member

@XhmikosR XhmikosR commented Jul 9, 2018

Fixes #26830

@XhmikosR XhmikosR changed the title Add missing role=button in dropdown-toggle example Add missing role="button" in .navbar's .dropdown-toggle Jul 9, 2018
@XhmikosR XhmikosR added this to Inbox in v4.1.2 via automation Jul 9, 2018
@XhmikosR XhmikosR requested a review from mdo July 9, 2018 13:40
@patrickhlauke patrickhlauke merged commit 8b50a72 into v4-dev Jul 9, 2018
v4.1.2 automation moved this from Inbox to Shipped Jul 9, 2018
@XhmikosR XhmikosR deleted the XhmikosR-patch-1 branch July 9, 2018 13:42
@patrickhlauke
Copy link
Member

oops, just realised perhaps intent was not to merge due to closeness of new release...sorry if that was the case/if that creates issues now :(

@XhmikosR
Copy link
Member Author

XhmikosR commented Jul 9, 2018

Nah, this is good I believe; it's a trivial change, don't worry.

@mdo mdo mentioned this pull request Jul 9, 2018
@thgh
Copy link
Contributor

thgh commented Oct 7, 2018

Why does Bootstrap use <a> instead of <button> for a button functionality?

@patrickhlauke
Copy link
Member

mainly, for ease/consistency of styling. as it's then still exposed correctly thanks to the role="button", it's not a major issue.

of course, authors can use an actual <button>, e.g. something like

<button class="btn btn-link nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown link</button>

but currently the baseline for the text in the links and the text in the button don't always correctly line up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v4.1.2
  
Shipped
Development

Successfully merging this pull request may close these issues.

None yet

3 participants