-
Notifications
You must be signed in to change notification settings - Fork 29
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
iron-collapse is focusable (by clicking or tabbing into it), which produces a focus outline in browsers #10
Comments
Agreed that it doesn't make sense for That said, it would be nice if the onus weren't on the developer to add the correct ARIA states and properties to the controlling button (see http://thepaciellogroup.github.io/disclosure-button/example2.html for an example of what states and properties are needed) - currently they're auto-added to the |
Hmm, unfortunately anything can be a "controlling" button (i.e a /cc @cdata @morethanreal for input |
I see - and you normally wire up the Semantically, the thing that controls the Would it be too heavyweight to create some kind of container for both the controller which handles both wiring up the mouse/touch/keyboard behaviour of the controller and managing its semantic attributes? Or is there some other way we can reach out and modify the controller, e.g. having the |
At the very minimum, though, if we're going to require developers to handle their own ARIA attributes, then the demo code inside |
Was this ever resolved? I still see the iron-collapse getting the ugly blue border, and I struggle to see how to stop it (short of forking iron-collapse and removing the Edit:
|
@davidmaxwaterman consider using another way to highlight element after removing outline for a11y. Elements like |
Yeah, I thought about that, but tbh I don't see the point - the whole point of my UI is that all other collapse items are hidden and this one is shown, so it is perfectly obvious what is happening - there's only one anyway. Also, I kind of agree with the original poster that it is the button that triggered the opening of the collapsible element that should be focused, rather than the collapsible element itself. |
(Copied from Polymer/polymer#1760)
Illustrated by demo: https://elements.polymer-project.org/elements/iron-collapse?view=demo:demo/index.html
Clicking on the content inside core-collapse, or tabbing into it, produces an ugly "focused" outline (on Chrome, a glowing blue outline). In my opinion, this should not be the desired behavior. The element controlling the iron-collapse (e.g., a button) is the one that should be focusable, and the developer is the one that should be responsible for making sure that it is. Making the iron-collapse focusable doesn't achieve anything useful.
The
hostAttributes
of iron-collapse hastabindex: 0
, which is causing this behavior. There's no way to remove the behavior. Even settingtabindex="-1"
in the iron-collapse element makes it focusable on click (strange, because it isn't tabbable).core-collapse in v0.5 does not have this behavior; I'd say this a regression.
P.S. I'd love for this to be my first pull request/contribution to open source on GitHub, if you devs agree with me and would let me. 😃
The text was updated successfully, but these errors were encountered: