Feature request: Hover over trigger for amp-bind
We are building a responsive site in AMP and would like to trigger a dropdown menu on mouse over which I guess would default to onclick on mobile? This is a feature request to add this to amp-bind
/to @choumx
/cc @ericlindley-g
Thanks for the feature request, @bjalford !
I hesitate to support a dropdown on hover via amp-bind, because hover doesn't necessarily signal a high level of user intent, and just linking that to a particular bind state would open up a lot of undesirable interactions (ones that extend beyond hover triggering a dropdown)
A couple other options:
• Is there a reason you're not doing this with CSS :hover selector? I imagine it could be due to the CSS limit on pages, but would be curious if there's a functionality barrier (such as if you want both a hover action and a click action to trigger dropdowns—in this case, you could use the checkbox hack, but of course that would mean more CSS)
• We could think about enabling an "expand-on-hover" attribute just to amp-accordion (though I suspect that some of the same UX issues might be possible here, as well) @camelburrito , WDYT?
Accordions should never expand on hover . They are not meant to be drop downs . We can build proper drop downs with amp-selector.
i was trying something like this couple of days ago
http://jsbin.com/falohu/57 (might not be fully presentable and needs tweaks.)
@camelburrito — I'm curious: what's the reasoning behind not adding the hover functionality to amp-accordion? Is it that the technical implementation isn't conducive to hover, that there are UX issues, or is it more a question of semantics for the component itself?
@bjalford , since amp-bind is not the likely route for this feature, I've opened a new bug for a drop-down on hover here. Will close this bug, unless folks do think it's important to add hover support directly to amp-bind, rather than supporting another way.