-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Buttons require a visual focus state #142
Comments
@ThomasBurleson are you the person in charge of ripple effects? There is still some work to be done for buttons and link buttons to be accessible, in addition to this focus style. |
This will mostly like be resolved with approach similar to that used within the new css Ink Ripples solution. |
Waiting on input from UX team. |
Hello, I found that on the demo site, a It probably cause by material/src/components/buttons/buttons.js Lines 82 to 87 in ca7793d
Don't you think it will be better to remove the |
@scarletsky Perhaps I do not understand. The |
@ThomasBurleson |
@ThomasBurleson the class being added to trigger ink effects in JS, yes? The implementation looks fine to me, as long as there's no race condition with the @scarletsky the focus state should stay on the element as long as it's focused, not based on a time interval. |
@marcysutton |
The focus class is used to add some visual styling to the outer element
|
It seems like some of you are suggesting that the problem is that the element is remaining in a focus state. It's supposed to do that: http://jsfiddle.net/nv3rvru1/8/ I think the problem is the choice to apply visual effects based on focus state. However, I don't know enough to say how accessibility fits in here. |
👍 |
Don't you think there could be some sort of option applied to the that would choose whether we want the :focus to stay on or be removed after clicking? This seems to be a personal preference that not everyone agrees on, so allowing the developer to choose would make everyone happy. |
Buttons actually have a focus state now, so I'm closing this issue. @skribbz14 to answer your question, consistency is more important in this case. Supporting both of those options would add complexity to maintain, and in my opinion would fragment the Material Design user experience. I have a question out to the UX team about how controls should handle visual focus in a way that works with the browser and looks intentional. Work on that can be tracked here: #1594 There is also a separate issue open for the button pressed state: #2089 |
Yeah all the buttons are ok with now. |
To make flat and raised buttons accessible from the keyboard, they should have visual contrast upon user interaction. In the Material Design spec, focus states are illustrated with a ripple effect:
A similar ripple effect is needed to add focus states to all buttons.
The text was updated successfully, but these errors were encountered: