Open lukewarlow opened 4 weeks ago
So far I think we've been talking about a long press as a touch input interest mechanism.
Pros:
Potential issues to overcome:
Potentially overloaded because it's already used for other things
Might interfere with text selection
Potential solutions are to encourage Devs to add user-select: none to interesttarget buttons (perhaps apply automatically but less keen on this)
For elements that already trigger a context menu on long press we can add this trigger action to that context menu just like copy link is already an option.
Might not be possible to trigger for users with certain conditions
Hopefully those users will be able to use TalkBack and that will be able to trigger this. Needs confirming.
Might need to handle focus differently on touch so it doesn't count as a trigger
Unfortunate but not impossible.
Hard to polyfil due to lack of "long press" event.
This will just have to be accepted, but perhaps we should add this to the platform too.
It might be controversial to say this, but I think it might be necessary to leave some parts of the concept of "interest" to user agents to define. For example, in a Vision Pro like platform, with eye-tracking and a distinctly non-keyboard, non-mouse user interface, it likely needs to be up to the platform to decide when a user is "interested" in an element. I don't think we should (or need to) write down exactly how this works. In contrast, keyboard users and mouse users have fairly standard ways to indicate "interest", namely focusing or hovering the element. These, I feel, should be standardized so they behave in the same way across browsers and platforms. Somewhere in the middle is touch. Perhaps touch is standardized enough that we can specify it, but perhaps not? What's important, to me at least, is that the standard says, normatively, that the user must have a way to "indicate interest" in an element, no matter their input modality.
Stepping back off the soap-box, per your questions about touch:
Potentially overloaded because it's already used for other things
In chromium at least, I could see just adding an item to the existing context menu.
Might interfere with text selection
I agree this might be an issue, but I would see it as an implementation issue maybe? It must be possible for the user to do both, somehow.
Might not be possible to trigger for users with certain conditions
I might need more context on this one. But again, the UA should provide an accessible way to indicate interest.
Might need to handle focus differently on touch so it doesn't count as a trigger
Agree completely.
Hard to polyfill due to lack of "long press" event.
Agree. But it's not a requirement that new features be polyfillable. Definitely nice to have though.
The Open UI Community Group just discussed [interest invokers] Touch inputs
.
Hard to polyfill due to lack of "long press" event.
Agree. But it's not a requirement that new features be polyfillable. Definitely nice to have though.
On Chrome / Firefox, contextmenu
is a long press event. You can check that the event's pointerType is touch to filter out right clicks.
Might interfere with text selection
I agree this might be an issue, but I would see it as an implementation issue maybe? It must be possible for the user to do both, somehow.
And drag and drop, and contextmenu of course. You can have all of these things defined and they already get in the way of each other, this is one more thing but seems fine.
Some platforms have a shorter timeout plus haptic feedback for one action and a longer long press timeout for a different action. E.g. The homescreen on iOS picks up the icon for dragging before showing the menu. This is something we could explore to disambiguate.
The Open UI Community Group just discussed [interest invokers] Touch inputs
, and agreed to the following:
RESOLVED: the spec should say that any user "must" be able to show interest via some input modality.
We've discussed this before but I don't think there's a dedicated issue to talk about what could constitute interest on a touch device (e.g. phone, tablet, certain laptops).
We should also discuss what potential issues there are with this and potential work arounds.