-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
Checkbox and Radio (data-toggle buttons) are not accessible by pressing tab #12145
Comments
But that doesnt seem to be a bootstrap problem ..... i tired in win 7 maj browsers it skips to the link |
To me, it seems to be a problem that should be solved by bootstrap. The problem is that the actual input has |
Changing such css properties might cause complexities. @cvrebert take a look. In the mean time I'm looking for a fix. |
on our end, we fixed this problem by changing bootstrap css as follows: Before: [data-toggle=buttons]>.btn>input[type=radio],
[data-toggle=buttons]>.btn>input[type=checkbox] {
display: none;
} After: [data-toggle=buttons]>.btn>input[type=radio],
[data-toggle=buttons]>.btn>input[type=checkbox] {
position: absolute;
left: -9999px;
} |
This worked, once we added display:inline or block. [data-toggle="buttons"] > .btn > input[type="radio"],
[data-toggle="buttons"] > .btn > input[type="checkbox"] {
display:inline;
position:absolute;
left:-9999px;
} |
There is one problem this doesn't solve. We have a business request that a user should be allowed to click on the buttons, then press Enter to submit the form. While I can tab through the buttons now, when I click on a button with the mouse the checkbox still does not receive input focus so the Enter key does not work. Any idea how to fix this? |
As of the current version of the code in the |
not a js bug, reassigning to css/html team |
+1 Same issue. I'm doing an accessibility audit on our Bootstrap based controls at https://github.com/ExactTarget/fuelux/tree/3.0.0-wip @zzDave Removing the display:none fixed the tabbing issue. Thanks. |
(revising my previous comment) The above snippets did help with tabbing, and I was able to use the arrow keys to choose radio buttons in my case. Though as @mbarbier1 implies above.. the checked property doesn't change this way so we cannot submit the right values. Also from a UX standpoint, tabbing does not seem to set the focus (so I can't tell visually which set of buttons I'm on until I change my selection via arrow keys). |
We'd need some JavaScript to add focus styling to the labels. |
@fat Pretty sure we need JS here to detect when the |
This is how we do it in FuelUX with a CSS-only sibling selector.
But this requires an extra span tag, of course. |
Yeah, and the span would have to be the |
If only we had |
+1 Same issue. I need this control adapted to the new law(!) in Norway that On Fri, Jun 13, 2014 at 6:09 PM, Stephen James notifications@github.com
|
As @mdo mentioned, to get this working we would need to introduce breaking changes which can not happen until v4 because of SemVer. Maybe somebody would take the liberty of creating a plugin that patches this in the meantime? |
Well the JS can happen before then. |
Yup, definitely, but then there still is the problem with focusing radio inputs. |
I implemented this as a proof-of-concept yesterday, which can be seen here. Try tabbing to |
In the latest update of bootstrap tabbing on checkbox and radios are now working, but it is not visible or no focus styles.
and css:
These workaround makes the checkbox and radio more accessible by putting outline when they are focused. We can further tweak the style in this css, to match the other buttons. |
@jeffkevin #13907 will solve this. |
nice thanks! |
I believe this is fixed now that #13907 merged. |
Tested on all major browsers in windows 8.1
Checkbox and radio buttons are not accessible when pressing the TAB key,
to see the bug
expected result: focus on the checkbox below it.
current result: jumped to the link skipping both the checkbox and radio buttons.
The text was updated successfully, but these errors were encountered: