-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Radios should activate ripple when their corresponding label is pressed #9
Comments
Since input control components don't know about their labels implicitly, this one maybe tricky to implement. Let's discuss solutions here before deciding on a concrete implementation. |
Proposal 1: fire ripple on focus, if not currently rippling.Add a The downside is that a ripple would also be triggered when tabbing to the element, which I'm not sure is desirable. Distinguishing between a tab focus and a label click focus would require either a global event listener, or a DOM search + event listener addition to every label that may be associated with the control (both undesirable). Requirements: A mechanism for firing a ripple animation on demand in Proposal 2: implement ripple-triggering in
|
I wonder if the caveat for Proposal 2 is such a big deal since we may have to fix autofill textfields with JavaScript anyway (#137) Seems like triggering a ripple from tabbing (as in proposal 1), unless we implement that on all form elements, might be distracting. That could also be a question for other members of Material Design as well. |
Proposal 2 seems best, however it seems like a lot of work. Let's confirm with design that this UX is best moving forward, and if so, we'll implement. |
This PR creates MDCFormField, which manages the runtime relationship between an input element and its label, enabling label events to trigger input ripples. Implements #9.
This PR creates MDCFormField, which manages the runtime relationship between an input element and its label, enabling label events to trigger input ripples. Implements #9.
This PR creates MDCFormField, which manages the runtime relationship between an input element and its label, enabling label events to trigger input ripples. Implements #9.
This PR creates MDCFormField, which manages the runtime relationship between an input element and its label, enabling label events to trigger input ripples. Implements #9.
This PR creates MDCFormField, which manages the runtime relationship between an input element and its label, enabling label events to trigger input ripples. Implements #9.
This PR creates MDCFormField, which manages the runtime relationship between an input element and its label, enabling label events to trigger input ripples. Implements #9.
v2 @ master
all
OS X El Capitan
npm run dev
and navigate to http://localhost:8080/radio.htmlThe ink ripple should activate
Only the focus ripple activates
This is due to the fact that
isSurfaceActive
is always set to false in the radio's ripple adapter. Instead, we need to set it conditionally based on whether or not the label is being interacted with.The text was updated successfully, but these errors were encountered: