You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
So far I think we've been talking about a long press as a touch input interest mechanism.
Pros:
This isn't a complete new behaviour, touch devices already use long press for some secondary actions (e.g. text selection, copy, paste, and showing tooltips in the case of Android)
Potential issues to overcome:
Potentially overloaded because it's already used for other things
Might interfere with text selection
Might not be possible to trigger for users with certain conditions
Might need to handle focus differently on touch so it doesn't count as a trigger
Hard to polyfil due to lack of "long press" event.
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.
The full IRC log of that discussion
<jarhar> Luke: we've discussed before the idea of interest invokers is that theyre somewhat agnostic to the input method. if its mouse you have hover, keyboard is focus, eye tracking you get whatever
<jarhar> Luke: one of the input modalities is touch screens, we've discussed various ideas how that should work
<jarhar> Luke: this is really to get the ball rolling on approaches to it, what we envisage seeing
<jarhar> Luke: is this even something that we want to do? it might be that on touch screens that its up to the ua to decide how it works
<jarhar> Luke: the two proposed resolutions i want are - do we think that intreest invokers should always be able to be used?
<jarhar> Luke: if youre on a touch screen, does the ua have to provide some mechanism? we could say its optional, and up to the ua
<jarhar> Luke: for hover invokers we could require it
<gregwhitworth> q+
<jarhar> Luke: or, as mason pointed out, the ua must provide this in some mechanism depending on the input
<jarhar> Luke: or we could spec some kind of how this should actually work
<jarhar> Luke: personally i would like to require it for mouse keyboard and touch
<jarhar> Luke: i think touch might be difficult to spec because it depends on platform specifics
<jarhar> Luke: long press is a thing on android to show tooltips, if you have an icon button. i dont know if this is a generic thing, but you long press and get a description
<jarhar> Luke: pro of that is that it at least matches one platform, but there are issues to overcome, it coudl be overloaded or mess with text selection
<jarhar> Luke: buttons in some uas dont even have text selection enabled, links you can text select from a link very well because it loads the context menu
<jarhar> Luke: some users might not be able to do long press so we need to figure out at story as well
<jarhar> Luke: we could hook it into talkback somehow
<jarhar> Luke: or if its a thing in ats
<jarhar> Luke: we would have to handle focus differently, on mobile the prototype is a bit weird
<jarhar> Luke: and the other bit thats not too big a deal is that its hard to polyfill because theres no longpress event
<jarhar> Luke: you would have to impelentnt that yourself
<jarhar> q?
<keithamus> q+
<jarhar> gregwhitworth: i missed the last discussion. the interest invokers statement, what is the actual job to be done? i conceptually understand it with the long press
<jarhar> gregwhitworth: im making an assumption that its going to occur. i guess that is an interest in the popup
<jarhar> gregwhitworth: are you able to give me a one sentence heres the job its trying to fulfill
<jarhar> gregwhitworth: how long its held down to invoke a popover
<jarhar> keithamus: i think there are two strong use cases for the application of interest invokers
<jarhar> keithamus: one is tooltips, and another is page previews, like wikipedia or github
<jarhar> keithamus: on any input devices, the idea is that it should be an at a glance discovery of the element youre showing interest on
<jarhar> keithamus: users avatar on twitter or facebook or whatever,
<jarhar> gregwhitworth: that gives me the use case
<jarhar> gregwhitworth: i guess my - i agree that if you go down this road it should be a must. you've called out the problem that the devils in the details, how do we get everyone to agree
<jarhar> gregwhitworth: im curious if we're not able to - pointerevents is very generic, is doesn't define behaviors on certain elements
<jarhar> gregwhitworth: if that was the resolution i would +1 it, but the devils in the details
<gregwhitworth> ack gregwhitworth
<gregwhitworth> ack keithamus
<jarhar> keithamus: my general feelings on this is that its potentially hard or impossible to spec
<jarhar> keithamus: i do think its easier with mouse and keyboard
<jarhar> keithamus: then it gets very difficult when we talk about touch screens because there are many applications and they treat ui differently
<sanketj_> q+
<jarhar> keithamus: keyboard and mouse are standardized, mice have 2 buttons
<jarhar> keithamus: keyboard universally have a tab key
<jarhar> keithamus: as luke points out, long press on android is different from ios
<gregwhitworth> q+
<jarhar> keithamus: i cant imagine us being able to spec or suggest something that would fucntion idiomatically that apple would be satisfied with
<jarhar> keithamus: i dont know how much leverage we would have to add some verbage in the spec that says you gotta do this
<jarhar> keithamus: yeah sure they gotta do everything
<jarhar> keithamus: tail call recursions in the ecmascript spec but 2/3 browsers dont do it
<jarhar> keithamus: we can say it, but the rubber has to meet the road somewhere
<jarhar> keithamus: not that we shouldn't do it, but whats the tractable part of this
<gregwhitworth> ack sanketj_
<jarhar> sanketj_: i want to +1 what others have said. theres a lot of behaviors that are different on different platforms when it comes to touch. i dont think the ecosystem is going to get to a point where theyre consistent
<jarhar> sanketj_: ipads have this feature called tap to hover, when you tap on something you get a hover preview
<jarhar> sanketj_: bringint that to other touch devices has been problematic
<keithamus> q+
<jarhar> sanketj_: i dont think theres going to be a standardized way to say that this kind of touch input should do this everywhere
<jarhar> sanketj_: maybe theres no other way than to say its up to the ua, or we dont say anything, which feels worse
<gregwhitworth> ack gregwhitworth
<gregwhitworth> ack keithamus
<jarhar> keithamus: theres other things to think about to spark some imagination, tvs have a very different mechanism for focus and stuff
<jarhar> keithamus: usually you have a dpad, and i dont think we want to have focus follow interest in that example because the only way to navigate is with focus, and it exposes more than a tv user would want
<jarhar> keithamus: and of course eye tracking - you cant have interest land on wherever the user is looking at
<jarhar> keithamus: so theres a whole world of considerations there. is it a delay, a visual indicator that youre about to expose that your einterested in this element
<jarhar> keithamus: theyre in the camp of this - its like mason, its an unsolved problem. if it was solved then it would be consistent, but we dont even have consistency within one as sanket points out
<jarhar> Luke: question 1: do we want to want to require touch devices to have some mechanism to show interest?
<jarhar> Luke: while that may seem slihgtly unimportant, the key thing is that im building an interface and im using interesst target, can i use it knowing that it wont show on all platforms?
<zcorpan> q+
<keithamus> q+
<jarhar> Luke: could it be on mobile devices like wikipedias preview it doesn't show and thats ok?
<jarhar> Luke: or do we want a mechanism on those platforms
<jarhar> Luke: it could be like mason points out that we dont require it for keyboard or mouse, up to the ua to decide what they want to do
<jarhar> Luke: they should say that you should provide interst nomatter the modality
<bkardell_> "you should no matter the modality" makes sense
<jarhar> Luke: i dont want to end up in a situation where its only implemented for mouse and keybard
<jarhar> Luke: i want to see long pressing on a button do something
<jarhar> Luke: but at the same time i dont want to put too much emphasis on uas to do stuff and delay the whole thing
<gregwhitworth> ack zcorpan
<jarhar> zcorpan: one possible user interface for touch devices would be to render another button next to the thing and you would touch that to get the popover
<jarhar> zcorpan: maybe that could be an opt in
<jarhar> zcorpan: if the author feels that its important and needs to be availble everywhere
<scotto8> q+
<jarhar> zcorpan: please make it available and show another button
<jarhar> zcorpan: with mouse and keyboard, its more discoverable because you hover or focus before click/enter
<jarhar> zcorpan: with touch you just touch and theres no opportunity for discovering
<jarhar> zcorpan: but if you have a questionmark button next to it then you have something to tap
<gregwhitworth> ack keithamus
<jarhar> keithamus: i think that sounds good, i would want that to be a pseudo element so its configurable for design system
<jarhar> keithamus: i wonder if we could map it to existing heuristics
<jarhar> keithamus: whenever focus visible is applied, then it should or must show an invoker. maybe that covers some use cases?
<gregwhitworth> ack scotto
<jarhar> scotto8: i was going to +1 simons idea
<gregwhitworth> s/scotto8/scotto
<jarhar> scotto8: dont make it an opt in, because if someone sees a bunch of these buttons show up everywhere maybe they'll rethink their life choices, and then they design it in a way where they dont have all these things showing up on touch
<jarhar> scotto8: i think it makes sense to have that be the way that it does represent itself
<jarhar> scotto8: if someones not happy with how that renders, then they can change their ui and make it something more consistent across devices
<jarhar> Luke: alternative to that is we dont do it auitomatically at all and they can implement it themselves
<jarhar> Luke: we have css media queries for input modalities, so you could hide your interest invoker and use a real invoker instead - or prevent it from doing what you want
<jarhar> Luke: good ideas
<jarhar> scotto8: to coutner that, if there was also a pseudo element then someone could use css media queries and then add their own and then best of both worlds
<jarhar> scotto8: i just worry about not doing it by default, gives people false belief that thjey dont have to do anything
<jarhar> scotto8: when working with developers, html allows you to do this, that doesnt mean you should
<jarhar> gregwhitworth: we are at time, we will have to pick this up again
<gregwhitworth> Zakim, end meeting
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.
The full IRC log of that discussion
<hdv> Luke: we didn't get to a resolution on this last time
<masonf> q+
<flackr> q+
<hdv> Luke: will we require invokers to always be invokable, try our best to make it work for all modalities, or do we accept it's not necessarily possible in all modalities?
<hdv> Luke: at least on Android there's buttons you can long press to show tooltips, not sure if there's similar mechanisms on other platforms like iOS
<hdv> Luke: one issue around this is that interest should naturally be before invoking… if you have the long press, that's naturally more of an invokation than showing interestg
<hdv> s/interestg/interest
<keithamus> q+
<hdv> Luke: there's also the issue that longpress on some elements already does stuff, eg on links. So can we spec this, would UAs actually be able to implement that?
<hdv> Luke: or would people get a separate toggle?
<hdv> Luke: personally feel we'd rather have something buitl in if anything
<hdv> ack mason
<hdv> masonf: my opinion is that for keyboard and for mouse, the standard should dictate how it works
<hdv> masonf: the spec should also say for other input modalities, like touch and others, there should 'be a way' to show interest
<hdv> masonf: that way being up to the UA, because of the many differences between platforms today
<hdv> masonf: what's most important is that all users can do the thing
<hdv> masonf: and probably should be specced that interest is before invoke
<masonf> ack flackr
<keithamus> q-
<hdv> flackr: I agree, we should have a way to access these with touch. these features should work with the standard modality of the device, on some devices maybe you have something like gaze… but on some devices you might only have touch and that should be supported
<hdv> flackr: there are lots of ways people have talked about this… there are a lot of overloaded actions
<hdv> flackr: there's menu actions, drag and drop… many ways this has been done in native UIs
<hdv> flackr: could see this working if interest is nondestructive, you could probably do thisif the finger lingered long enough without scroll
<masonf> q?
<hdv> flackr: there are a lot of details around how this interacts with other featueres
<hdv> s/featueres/features
<hdv> flackr: another issue is disembiguating between different actions, eg you could have drag and drop and context menu at the same time that doesn't conflict
<hdv> Luke: as in HTML drag and drop? does that support touch devices?
<hdv> flackr: yes on iOS, there's work underway for Android too
<hdv> masonf: how standardised is this?
<hdv> flackr: that's literally the homescreen behaviour on iOS and Android… but on the web it's not standardised
<hdv> masonf: my fear is how it is supported
<hdv> flackr: even if we don't spec it you would still get a contextmenu on longpress
<hdv> flackr: iOS supports this and I think Android does in some contexts
<hdv> masonf: I don't know if there is a standard for contextmenu, I think there isn't detail in the spec on long press vs hard press
<masonf> q?
<hdv> flackr: for 3d press could look at maximum pressure or something like that
<hdv> Luke: we could resolve that we should make it a MUST, for any given device/set of modalities, at least one of them should be available to show interest?
<masonf> Proposed resolution: the spec should say that UAs "must" support showing interest via any input modality.
<hdv> Luke: any input modality seems ambiguous
<hdv> dbaron: kind of like 'any user must be able to'?
<masonf> Proposed resolution: the spec should say that any user "must" be able to show interest via some input modality.
<Luke> +1
<keithamus> +1
<hdv> +1
<flackr> +1
<masonf> RESOLVED: the spec should say that any user "must" be able to show interest via some input modality.
<dbaron> +1
<brecht_dr> +1
Here's a new idea for touch, from an internal discussion (credit to @b1tr0t):
On touch platforms (or potentially any platform where the UA determines that there's no mouse/keyboard?) the UA adds a pseudo-element button (such as ℹ️) next to the interesttarget source element. That button can then be invoked in the normal way to indicate interest in the source element. And the pseudo element should be available for custom styling via CSS. Perhaps the button can be a popover=manual anchor-positioned to the source element? Just to avoid layout shift on touch platforms.
This idea gets around the problems of using long-touch, and is actually a cow-path paved by several design systems.
Adding in here that this is a pattern that is a fairly common pattern, for example commerce checkout flows. Smashing Mag did a writeup a few years ago that covers tooltip patterns, including this one.
The Open UI Community Group just discussed [interest invokers] Touch inputs.
The full IRC log of that discussion
<hdv> masonf: this is about interesttarget and interest invokers
<hdv> masonf: webkit folks are against this feature because it is not well defined on toch
<hdv> s/toch/touch
<hdv> masonf: there are solutions for touch and keyboard
<gregwhitworth> q+
<hdv> masonf: we actually resolved the spec for interesttarget would say it should cover touch but doesn't say how
<hdv> masonf: it's kind of nebulous which understandably the webkit folks don't particularly like
<hdv> masonf: so we're looking for something that works across the board. Touch is very overloaded. When you try to set target on something that is not a button, eg to provide a definition for the text in a <span> … there is a couple of things that could happen on touch, you could long touch to copy paste, also to show a context menu…
<hdv> masonf: now if we add interesttargets and devs start using them everywhere, then copy pasting and context menus are harder to use
<hdv> masonf: idea: on some platforms, an extra button shows up when there is an interest target, then when you click on that button that indicates you have interest in that target
<hdv> masonf: this would be a lot more discoverable and a lot more out of the way… and it could have a pseudo element that is fully stylable
<hdv> masonf: could also be a popover=manual that is anchor positioned
<una> q?
<una> q=
<una> q+
<hdv> masonf: curious what use cases would be broken by that
<gregwhitworth> ack una
<sanketj_> q+
<hdv> una: very interesting approach that I really like… but it seems like this means there would be different use cases in mobile vs desktop, which authors would need to separately author
<hdv> una: could use a pointer media query that checks for touch input
<hdv> una: you wouldnt want that on desktop if you had a pointer device, you wouldn't want that on mobile (using mobile as shorthand for no pointer)
<scott> q+
<hdv> masonf: yes idea would be this button only shows up when you have a coarse pointer
<hdv> una: really like the idea of handling this with some kind of click handler on certain pointer devices
<hdv> una: a developer should have the ownership on when and how it appears
<hdv> una: eg the github preview repo might look differrent than a preview card on social media… should prob be up to the author
<hdv> masonf: agree it should be author styleable but with default that it shows up
<hdv> masonf: does it sound reasonable to make it show up by default?
<hdv> una: worry that developers might get things they are not expecting
<hdv> masonf: if we make it a popover that is anchor positioned, that probably doesn't have weird side effects as it doesn't affect flow layout and positioning
<hdv> una: still think it obscuring content would be a problem
<hdv> una: can see it get really messy really quickly
<hdv> gregwhitworth: is there historical precedence we can lean on with touch events moving to pointer events… as we don't know every form factor now and in the future
<una> ^especially if there is a dense layout with interest invokers
<una> ^people use the interest modality to help with data visualization on dense layouts
<hdv> gregwhitworth: what we put forward solves the problem, but worry that setting vision aside would cause problems along the way
<hdv> gregwhitworth: if we start defining what happens on hover by user agents I think we'll get pushback
<hdv> gregwhitworth: I agree with una, we could end with issues
<gregwhitworth> ack gregwhitworth
<gregwhitworth> ack sanketj_
<hdv> gregwhitworth: you could probably not either/or any of this, eg lots of users would use touch and then also mouse, I used to on Surface
<hdv> sanketj_: yes there are devices that have keyboard, mouse and touch, not just Microsoft's… so the risk of getting heuristics wrong is real
<hdv> sanketj_: I know Chrome, on desktop touch, has a menu that shows up on touch, that has compat concerns
<hdv> sanketj_: I too worry side effects could happen, not sure if there is a good interoperable option we could decide on
<gregwhitworth> +1 to what Sanket just said
<hdv> sanketj_: can we define, if interesttarget is set and long touch is done, can we define that other actions like context menu and copy/paste just aren't available
<gregwhitworth> q?
<hdv> masonf: I think users would find that annoying
<hdv> q+
<hdv> masonf: on my iOS device, if I long press a link I want to copy/paste it, instead I get a giant preview… I don't like that… and also developers, you're removing a previous capability they had
<hdv> sanketj_: I see… probably not as much as issue for a button, but would be for additional things
<hdv> masonf: agree, button is prob not a problem here
<masonf> q?
<gregwhitworth> ack scott
<hdv> scott: I like the idea, it's interesting
<hdv> q-
<una> q+
<hdv> scott: would be curious to see what other browsers come up with… would be interesting to allow developers to style it, but not sure if developers should be able to decide whether to show/hide it
<hdv> scott: because it's ultimately about the user, they are first in everything we do
<brecht_dr> q+
<hdv> scott: could imagine a bare bones user agent representation of it while we ensure users can get to the content
<gregwhitworth> ack hdv
<gregwhitworth> ack una
<hdv> una: want to respectfully disagree with an example… am looking at an example right now that I think would be a worse user experience if automate
<hdv> s/automate/automated
<hdv> una: [shows GitHub home page, hovering over links where each individual link to a name of a repo as well as an image, each of these shows a popover on hover]
<hdv> una: if we add an extra button to show these on mobile, there would be a lot of buttons
<Penny> q+
<hdv> una: I think we'd degrade the user experience if we cluttered up the UI with lots of buttons, especially in this example where all these are links
<hdv> scott: actually I agree authors should be able to turn this off but users should be able to override
<hdv> una: do you envision the user control to be display settings for the user where they could force interest els to show?
<hdv> scott: yes
<gregwhitworth> ack brecht_dr
<hdv> una: I think that'd be a good way to do it, gives the user control and allows them to see if it makes things better
<hdv> brecht_dr: +1 to not wanting too much clutter
<hdv> brecht_dr: as a user I don't want to think about the difference between desktop and mobile…
<gregwhitworth> ack Penny
<sanketj_> q+
<hdv> Penny: I think it'd be good if there is a global and a per case setting, and a user pref that overrides everything
<masonf> q+
<hdv> Penny: maybe with the right combination of settings we can overcome the challenges
<gregwhitworth> ack sanketj_
<sanketj_> I'll type in my question.
<gregwhitworth> q+
<hdv> gregwhitworth: is there a preference for something that we are going to standardise as a user preference?
<gregwhitworth> ack gregwhitworth
<hdv> gregwhitworth: users and developers would have to be able to rely on the setting existing
<hdv> masonf: I don't think we've ever standarised on a setting like that
<hdv> s/we've/we can or have
<hdv> s/standarised/standardised
<bkardell_> q+ to say I suggested this for tabs
<hdv> gregwhitworth: looks like no webkit folks here… if I put their hat on… they'd probably expect this to be on by default?
<sanketj_> The unavailability of hover on touch is a general problem. Should we think about having recommending/mandating UAs to provide a option (ex. contextmenu option) to view the invoker target on long press?
<hdv> masonf: that is kind of the backup plan I think
<hdv> masonf: I did here some pushback on that too
<hdv> masonf: feedback I heard was it would be a lot of clicks to show interest
<gregwhitworth> ack masonf
<hdv> masonf: thanks all for the feedback today… some of this changed my opinion on things. Global on/off seems to be the right thing, not per platform
<hdv> masonf: little icon should be on or off across the board and developer can change this
<hdv> masonf: we can show a little i-icon when folks use interest and make it very easy to turn it off
<bkardell_> s/is there a preference for something/is there a precedent for something
<brecht_dr> q+
<hdv> masonf: was pushing for popover to keep it out of flow before but not sure on that now
<gregwhitworth> ack bkardell_
<Zakim> bkardell_, you wanted to say I suggested this for tabs
<sanketj_> I think I like the "backup plan" option better. Maybe the requirement would be that the UA needs to provide some type of UI to view interest - what that looks like may vary. Agree that the context menu has its limitations.
<hdv> bkardell_: it's come up a few times over the years… I don't think we have ever done that but it does keep coming up
<chrishtr> I really like the idea of showing the pseudo element icon by default on every platform; developers can then remove it / restyle it as needed.
<hdv> bkardell_: maybe there isn't a good answer… and UA nor author can provide it, it's really a user preference thing
<hdv> bkardell_: so maybe the best thing we can do is to make it very easy… if it's not observable that's probably easy, if not it's a bit harder
<gregwhitworth> ack brecht_dr
<hdv> brecht_dr: to masonf's earlier point… I think if we go that route we should be able to style the icon as well. And then there could be some other solutions on touch devices
<hdv> masonf: proposal definitely was that it would be a pseudo element that could be styled in all the ways pseudo els can
<hdv> una: curious to hear feedback from Apple on this
<hdv> una: I think it's a very interesting path forward
<hdv> masonf: I think next step would be to write out the proposal and maybe have the discusson on the webkit thread that already exists on this and has a lot of discussion already
<gregwhitworth> Zakim, end meeting
Clicking those ? buttons would trigger the interesttarget target element. The buttons could be made fully accessible, they would be part of the sequential focus navigation, etc.
To address the concerns raised in the meeting:
The ::interest-target-icon pseudo element would always be generated for any element that has an interesttarget attribute. This would not be dependent on pointer event precision, etc.
The pseudo element could be used to disable or control the visibility of the icons, as well as style them to fit the page.
The pseudo element would come after the element with interesttarget, but would be styled (by default) as position:static so that no content would be obscured. However, developers could change that to position:fixed and anchor-position them, if desired.
Hovering (with a mouse) the originating element (e.g. the button and span in the example) would also trigger interest.
Focusing (with a keyboard) the originating element would not trigger interest, since the preferred way to do that would be tabbing to the ? icon and activating it. This also removes the need to make <span interesttarget> keyboard focusable.
We should (strongly?) recommend that UA's have a user setting that allows three things: 1) the default behavior, 2)always show the ::interest-target-icon (even when developers have hidden it), and 3)never show those.
How to define the new text menu items added to the context menu. A new attribute on buttons and links, maybe? E.g. Follow or something? Is the placement of those new buttons guaranteed by spec? Or up to the UA to just place somewhere in the menu? It likely has to be the latter - is that ok?
Yes this, but to expand and tweak slightly, I don't think the attribute should need a value, instead use either textcontent or accname computation right? Also to confirm, I think choosing one of the menu items should use the regular machinery e.g. dispatch a click event and trigger activation behaviour.
We'd also need a new CSS pseudo class to detect when a button/link has been "hoisted" out to the context menu so we can hide it from the inert preview.
Presumably you'd hide all interactive controls in the preview right? So I think a pseudo class to know that the container has been used as a preview card would be useful, so that all controls can be hidden.
Ideally it should be a popover with a new role for such "previews".
A popover dialog with a localized name probably. Not sure the value in a new role. Particularly if it’s to behave very similarly to a dialog anyway.
“Maybe” the role description could be modified by browsers? But unless there would be larger plans for this popup outside of this use case, I’m not sure it’d be something that should get its own role that authors could then use willy nilly?
Presumably you'd hide all interactive controls in the preview right? So I think a pseudo class to know that the container has been used as a preview card would be useful, so that all controls can be hidden.
Yes, this could be an at-rule as well. We just need to detect if the preview is interactive (like on desktop) or not.
Particularly if it’s to behave very similarly to a dialog anyway.
It does behave like a dialog on touchscreens, but if we remember that this proposal is a "hovercard" it works very differently than dialogs on desktop. The "dialog" role might still be the correct role, but I think we need to have a discussion about it because it's not a typical interaction model. Perhaps, it's a "non-modal" dialog which is not very well defined in the specification. (FWIW, I just worked on a new more accessible hovercard implementation and used the "dialog" role today to make it work and it does mostly work.)
But unless there would be larger plans for this popup outside of this use case, I’m not sure it’d be something that should get its own role that authors could then use willy nilly?
💯. I don't think the new role need to exist as something that authors should be able to use, but just a new role behind the scenes that the UA can control.
Ok, after a bit of internal discussion (thanks @argyleink and @chrishtr), here's another proposal. My hope is that this one satisfies most of the requests on this thread:
There are two regions in that mockup, the top "hovercard" part, and the lower "UA provided menu" part.
a. The site will continue to be rendered, importantly unblurred, underneath the UA provided menu.
b. The UA will place the UA-provided menu somewhere on-screen, attempting to leave as much of the physical screen area un-obscured. For example, toward the bottom of the screen, leaving the top available.
c. New CSS env() values will be added (subject to bikeshedding) for context-menu-inset-top, context-menu-inset-right, context-menu-inset-bottom, and context-menu-inset-left. These will allow a hovercard to be positioned safely within the still-visible space left on screen, so that both the hovercard and UA menu can co-exist.
Taps on the menu will perform the selected menu item. Taps outside the menu will "fall through" to the rendered page, and will also close the UA menu. I.e. interactive elements rendered on the hovercard can still be tapped, which will simultaneously activate the tapped element and close the UA-provided menu (without performing any menu actions).
With the above system, the mockup should be able to look just like #1052 (comment), but that will require more work on the part of the developer, to be sure to position the hovercard appropriately, and likely blur the rest of the screen to avoid visual clutter? That last thing might even require that the hovercard is a modal <dialog> rather than a popover, but that should also be do-able via interesttarget.
Open questions:
What happens if the hovercard has an element with interesttarget? What's the behavior?
Are the developer ergonomics easy enough to make this work cleanly on touch and also on desktop? I.e. what's the "hook" to determine if the hovercard should render using context-menu-inset-top, etc?
On OS's that provide link previews in this area, is it "ok" to replace that link preview with a hovercard? I.e. what happens when long-pressing <a href=foo interesttarget=bar>? It would seem to me that interesttarget should take precedence, since it's likely providing a "better" link preview, customized to the site.
What happens if the hovercard has an element with interesttarget? What's the behavior?
I think disallowing interesttarget within hovercards is an acceptable solution for now. Although it should be possible to open a second dialog within a dialog and make this work if needed.
interactive elements rendered on the hovercard can still be tapped, which will simultaneously activate the tapped element and close the UA-provided menu
My understanding is that you raised this as a security issue. Was that resolved?
My understanding is that you raised this as a security issue. Was that resolved?
I asked some experts and they (also) told me my concerns were misplaced. See the comment here: #1052 (comment)
I think disallowing interesttarget within hovercards is an acceptable solution for now. Although it should be possible to open a second dialog within a dialog and make this work if needed.
Good to know that you think this would be ok. I also think it might be possible to support it, which I'd like to do, because on desktop environments, it would make complete sense to have nested interest targets. (Facebook has these already 😄 .) Perhaps when in long-press mode, and you long-press an interesttarget element on a showing hovercard, it just "works"? I.e. the new nested hovercard is shown, which (with developer styling taking care of this) takes the place of the first hovercard, and the UA menu continues to show?
The Open UI Community Group just discussed [interest invokers] Touch inputs.
The full IRC log of that discussion
<bkardell_> masonf: both of these next two are about interest invokers - this one is about touch input patterns
<bkardell_> masonf: I posted a new idea for this one, which I think gets everythingI heard/enables all of the use cases
<bkardell_> masonf: on touchscreen you have an element with interest target, and you long press it - two things happen simultaneously- the target gets invoked a thing shows up and the user agent menu shows up - the new thing is that the menu shows up more like an onscreen keyboard, not covering the whole thing
<bkardell_> masonf: the idea is that the developers positions it in the free area - we provide some css env variables that let the developer see where is the free space - what are the boundaries. I think you get the best of all worlds, you can have the hover card and the user agent can show the menu
<bkardell_> masonf: I think it even enables nested hover cards
<brecht_dr> q+
<masonf> ack brecht
<bkardell_> masonf: there are some open questions - main question is what is not solveable
<bkardell_> brecht_dr: how does it work with interactive elements inside the carrd
<bkardell_> masonf: the beauty is I think it just works... it is just part of the page.
<bkardell_> brecht_dr: I am assuming that that space automatically has some overflow so that if it gets screwed up you can get to it
<bkardell_> masonf: the key thing here is that it is up to the developer - I am telling you where will not be obscured
<bkardell_> q+
<masonf> bkardell_: to brecht's point, why would that area not be scrollable? Or have overflow? You don't want to clip it.
<bkardell_> masonf: it's like layout viewport, visual viewport - it just shows you where to lay it out... you can fix position stuff - the way I see you using is you can fix position using those offsets...
<bkardell_> masonf: I don't think any of that can or should be automatic
<masonf> ack bkardell
<bkardell_> brecht_dr: the only concern I have is that this is another thing you'll have to learn, if you don't you might wind up with a thing you don't want - in those cases you'll have to test it on a device to see it happening which is complicated
<bkardell_> masonf: I agree, I share that concern - the biggest concern is that you just develop on desktop and then you don't know what happens on mobile and someone can't get to it all of the sudden
<bkardell_> masonf: we ran into similar concerns with customizable select
<bkardell_> masonf: we explicitly went against UA defaults bc that made it harder. We can't have both, so if we try to make it perfect by default it's harder
<scott2> q+
<bkardell_> brecht_dr: I feel like this is different - In this case I wish there would be a good default
<bkardell_> masonf: the thing that needs styling is the hover card - a popover or a dialog - I think what you are suggesting is a UA default that in _some_ situations would solve this
<masonf> ack scott
<bkardell_> scott2: I would be very happy if there was some level of default ua styling - to at least account for any thing invoked by an interest target at least remained within the confines of the viewport. I have never encountered a situation where a developer would want a thing like this to be obscured/half off screen and just unable to get to it
<bkardell_> masonf: I am only hesitating at "How?" and looking back to what we tried with <select>
<bkardell_> masonf: I think that was kind of roundly rejected because devs would want to undo too much.
<bkardell_> scott2: I don't want to speak too broadly but people.... don't always do that... or even often
<bkardell_> masonf: I would need to give it some thought. I think, but I could be wrong, that you need some pseudo class that tells you when a popover has been invoked by one - and we don't have that right now
<bkardell_> +1
<masonf> bkardell_: let's just make it easy by default, if I haven't thought about it.
<bkardell_> scott2: if it wouldn't be in the UA sheet by default, that makes sense, give them a pseudo class - kick the can down the road a little bit, but make it really easy
<bkardell_> masonf: so the very specific thing is that we'd ask for a pseudo class for this very specific situation
<masonf> q?
<bkardell_> masonf: let me think about it a little, it was a good discussion, but I don't want to resolve on that just yet
because on desktop environments, it would make complete sense to have nested interest targets. (Facebook has these already 😄 .)
💯 it's a nice to have but we would totally ok with removing nested hovercards. We might do that soon anyway as we are trying to make the current implementation as accessible as possible and nested hovercards are a challenge.
There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label.
Activity
lukewarlow commentedon May 3, 2024
So far I think we've been talking about a long press as a touch input interest mechanism.
Pros:
Potential issues to overcome:
lukewarlow commentedon May 3, 2024
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.
Hopefully those users will be able to use TalkBack and that will be able to trigger this. Needs confirming.
Unfortunate but not impossible.
This will just have to be accepted, but perhaps we should add this to the platform too.
mfreed7 commentedon May 9, 2024
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:
In chromium at least, I could see just adding an item to the existing context menu.
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.
I might need more context on this one. But again, the UA should provide an accessible way to indicate interest.
Agree completely.
Agree. But it's not a requirement that new features be polyfillable. Definitely nice to have though.
css-meeting-bot commentedon May 16, 2024
The Open UI Community Group just discussed
[interest invokers] Touch inputs.The full IRC log of that discussion
<jarhar> Luke: we've discussed before the idea of interest invokers is that theyre somewhat agnostic to the input method. if its mouse you have hover, keyboard is focus, eye tracking you get whatever<jarhar> Luke: one of the input modalities is touch screens, we've discussed various ideas how that should work
<jarhar> Luke: this is really to get the ball rolling on approaches to it, what we envisage seeing
<jarhar> Luke: is this even something that we want to do? it might be that on touch screens that its up to the ua to decide how it works
<jarhar> Luke: the two proposed resolutions i want are - do we think that intreest invokers should always be able to be used?
<jarhar> Luke: if youre on a touch screen, does the ua have to provide some mechanism? we could say its optional, and up to the ua
<jarhar> Luke: for hover invokers we could require it
<gregwhitworth> q+
<jarhar> Luke: or, as mason pointed out, the ua must provide this in some mechanism depending on the input
<jarhar> Luke: or we could spec some kind of how this should actually work
<jarhar> Luke: personally i would like to require it for mouse keyboard and touch
<jarhar> Luke: i think touch might be difficult to spec because it depends on platform specifics
<jarhar> Luke: long press is a thing on android to show tooltips, if you have an icon button. i dont know if this is a generic thing, but you long press and get a description
<jarhar> Luke: pro of that is that it at least matches one platform, but there are issues to overcome, it coudl be overloaded or mess with text selection
<jarhar> Luke: buttons in some uas dont even have text selection enabled, links you can text select from a link very well because it loads the context menu
<jarhar> Luke: some users might not be able to do long press so we need to figure out at story as well
<jarhar> Luke: we could hook it into talkback somehow
<jarhar> Luke: or if its a thing in ats
<jarhar> Luke: we would have to handle focus differently, on mobile the prototype is a bit weird
<jarhar> Luke: and the other bit thats not too big a deal is that its hard to polyfill because theres no longpress event
<jarhar> Luke: you would have to impelentnt that yourself
<jarhar> q?
<keithamus> q+
<jarhar> gregwhitworth: i missed the last discussion. the interest invokers statement, what is the actual job to be done? i conceptually understand it with the long press
<jarhar> gregwhitworth: im making an assumption that its going to occur. i guess that is an interest in the popup
<jarhar> gregwhitworth: are you able to give me a one sentence heres the job its trying to fulfill
<jarhar> gregwhitworth: how long its held down to invoke a popover
<jarhar> keithamus: i think there are two strong use cases for the application of interest invokers
<jarhar> keithamus: one is tooltips, and another is page previews, like wikipedia or github
<jarhar> keithamus: on any input devices, the idea is that it should be an at a glance discovery of the element youre showing interest on
<jarhar> keithamus: users avatar on twitter or facebook or whatever,
<jarhar> gregwhitworth: that gives me the use case
<jarhar> gregwhitworth: i guess my - i agree that if you go down this road it should be a must. you've called out the problem that the devils in the details, how do we get everyone to agree
<jarhar> gregwhitworth: im curious if we're not able to - pointerevents is very generic, is doesn't define behaviors on certain elements
<jarhar> gregwhitworth: if that was the resolution i would +1 it, but the devils in the details
<gregwhitworth> ack gregwhitworth
<gregwhitworth> ack keithamus
<jarhar> keithamus: my general feelings on this is that its potentially hard or impossible to spec
<jarhar> keithamus: i do think its easier with mouse and keyboard
<jarhar> keithamus: then it gets very difficult when we talk about touch screens because there are many applications and they treat ui differently
<sanketj_> q+
<jarhar> keithamus: keyboard and mouse are standardized, mice have 2 buttons
<jarhar> keithamus: keyboard universally have a tab key
<jarhar> keithamus: as luke points out, long press on android is different from ios
<gregwhitworth> q+
<jarhar> keithamus: i cant imagine us being able to spec or suggest something that would fucntion idiomatically that apple would be satisfied with
<jarhar> keithamus: i dont know how much leverage we would have to add some verbage in the spec that says you gotta do this
<jarhar> keithamus: yeah sure they gotta do everything
<jarhar> keithamus: tail call recursions in the ecmascript spec but 2/3 browsers dont do it
<jarhar> keithamus: we can say it, but the rubber has to meet the road somewhere
<jarhar> keithamus: not that we shouldn't do it, but whats the tractable part of this
<gregwhitworth> ack sanketj_
<jarhar> sanketj_: i want to +1 what others have said. theres a lot of behaviors that are different on different platforms when it comes to touch. i dont think the ecosystem is going to get to a point where theyre consistent
<jarhar> sanketj_: ipads have this feature called tap to hover, when you tap on something you get a hover preview
<jarhar> sanketj_: bringint that to other touch devices has been problematic
<keithamus> q+
<jarhar> sanketj_: i dont think theres going to be a standardized way to say that this kind of touch input should do this everywhere
<jarhar> sanketj_: maybe theres no other way than to say its up to the ua, or we dont say anything, which feels worse
<gregwhitworth> ack gregwhitworth
<gregwhitworth> ack keithamus
<jarhar> keithamus: theres other things to think about to spark some imagination, tvs have a very different mechanism for focus and stuff
<jarhar> keithamus: usually you have a dpad, and i dont think we want to have focus follow interest in that example because the only way to navigate is with focus, and it exposes more than a tv user would want
<jarhar> keithamus: and of course eye tracking - you cant have interest land on wherever the user is looking at
<jarhar> keithamus: so theres a whole world of considerations there. is it a delay, a visual indicator that youre about to expose that your einterested in this element
<jarhar> keithamus: theyre in the camp of this - its like mason, its an unsolved problem. if it was solved then it would be consistent, but we dont even have consistency within one as sanket points out
<jarhar> Luke: question 1: do we want to want to require touch devices to have some mechanism to show interest?
<jarhar> Luke: while that may seem slihgtly unimportant, the key thing is that im building an interface and im using interesst target, can i use it knowing that it wont show on all platforms?
<zcorpan> q+
<keithamus> q+
<jarhar> Luke: could it be on mobile devices like wikipedias preview it doesn't show and thats ok?
<jarhar> Luke: or do we want a mechanism on those platforms
<jarhar> Luke: it could be like mason points out that we dont require it for keyboard or mouse, up to the ua to decide what they want to do
<jarhar> Luke: they should say that you should provide interst nomatter the modality
<bkardell_> "you should no matter the modality" makes sense
<jarhar> Luke: i dont want to end up in a situation where its only implemented for mouse and keybard
<jarhar> Luke: i want to see long pressing on a button do something
<jarhar> Luke: but at the same time i dont want to put too much emphasis on uas to do stuff and delay the whole thing
<gregwhitworth> ack zcorpan
<jarhar> zcorpan: one possible user interface for touch devices would be to render another button next to the thing and you would touch that to get the popover
<jarhar> zcorpan: maybe that could be an opt in
<jarhar> zcorpan: if the author feels that its important and needs to be availble everywhere
<scotto8> q+
<jarhar> zcorpan: please make it available and show another button
<jarhar> zcorpan: with mouse and keyboard, its more discoverable because you hover or focus before click/enter
<jarhar> zcorpan: with touch you just touch and theres no opportunity for discovering
<jarhar> zcorpan: but if you have a questionmark button next to it then you have something to tap
<gregwhitworth> ack keithamus
<jarhar> keithamus: i think that sounds good, i would want that to be a pseudo element so its configurable for design system
<jarhar> keithamus: i wonder if we could map it to existing heuristics
<jarhar> keithamus: whenever focus visible is applied, then it should or must show an invoker. maybe that covers some use cases?
<gregwhitworth> ack scotto
<jarhar> scotto8: i was going to +1 simons idea
<gregwhitworth> s/scotto8/scotto
<jarhar> scotto8: dont make it an opt in, because if someone sees a bunch of these buttons show up everywhere maybe they'll rethink their life choices, and then they design it in a way where they dont have all these things showing up on touch
<jarhar> scotto8: i think it makes sense to have that be the way that it does represent itself
<jarhar> scotto8: if someones not happy with how that renders, then they can change their ui and make it something more consistent across devices
<jarhar> Luke: alternative to that is we dont do it auitomatically at all and they can implement it themselves
<jarhar> Luke: we have css media queries for input modalities, so you could hide your interest invoker and use a real invoker instead - or prevent it from doing what you want
<jarhar> Luke: good ideas
<jarhar> scotto8: to coutner that, if there was also a pseudo element then someone could use css media queries and then add their own and then best of both worlds
<jarhar> scotto8: i just worry about not doing it by default, gives people false belief that thjey dont have to do anything
<jarhar> scotto8: when working with developers, html allows you to do this, that doesnt mean you should
<jarhar> gregwhitworth: we are at time, we will have to pick this up again
<gregwhitworth> Zakim, end meeting
flackr commentedon May 23, 2024
On Chrome / Firefox,
contextmenuis a long press event. You can check that the event's pointerType is touch to filter out right clicks.flackr commentedon May 23, 2024
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.
css-meeting-bot commentedon May 23, 2024
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.The full IRC log of that discussion
<hdv> Luke: we didn't get to a resolution on this last time<masonf> q+
<flackr> q+
<hdv> Luke: will we require invokers to always be invokable, try our best to make it work for all modalities, or do we accept it's not necessarily possible in all modalities?
<hdv> Luke: at least on Android there's buttons you can long press to show tooltips, not sure if there's similar mechanisms on other platforms like iOS
<hdv> Luke: one issue around this is that interest should naturally be before invoking… if you have the long press, that's naturally more of an invokation than showing interestg
<hdv> s/interestg/interest
<keithamus> q+
<hdv> Luke: there's also the issue that longpress on some elements already does stuff, eg on links. So can we spec this, would UAs actually be able to implement that?
<hdv> Luke: or would people get a separate toggle?
<hdv> Luke: personally feel we'd rather have something buitl in if anything
<hdv> ack mason
<hdv> masonf: my opinion is that for keyboard and for mouse, the standard should dictate how it works
<hdv> masonf: the spec should also say for other input modalities, like touch and others, there should 'be a way' to show interest
<hdv> masonf: that way being up to the UA, because of the many differences between platforms today
<hdv> masonf: what's most important is that all users can do the thing
<hdv> masonf: and probably should be specced that interest is before invoke
<masonf> ack flackr
<keithamus> q-
<hdv> flackr: I agree, we should have a way to access these with touch. these features should work with the standard modality of the device, on some devices maybe you have something like gaze… but on some devices you might only have touch and that should be supported
<hdv> flackr: there are lots of ways people have talked about this… there are a lot of overloaded actions
<hdv> flackr: there's menu actions, drag and drop… many ways this has been done in native UIs
<hdv> flackr: could see this working if interest is nondestructive, you could probably do thisif the finger lingered long enough without scroll
<masonf> q?
<hdv> flackr: there are a lot of details around how this interacts with other featueres
<hdv> s/featueres/features
<hdv> flackr: another issue is disembiguating between different actions, eg you could have drag and drop and context menu at the same time that doesn't conflict
<hdv> Luke: as in HTML drag and drop? does that support touch devices?
<hdv> flackr: yes on iOS, there's work underway for Android too
<hdv> masonf: how standardised is this?
<hdv> flackr: that's literally the homescreen behaviour on iOS and Android… but on the web it's not standardised
<hdv> masonf: my fear is how it is supported
<hdv> flackr: even if we don't spec it you would still get a contextmenu on longpress
<hdv> flackr: iOS supports this and I think Android does in some contexts
<hdv> masonf: I don't know if there is a standard for contextmenu, I think there isn't detail in the spec on long press vs hard press
<masonf> q?
<hdv> flackr: for 3d press could look at maximum pressure or something like that
<hdv> Luke: we could resolve that we should make it a MUST, for any given device/set of modalities, at least one of them should be available to show interest?
<masonf> Proposed resolution: the spec should say that UAs "must" support showing interest via any input modality.
<hdv> Luke: any input modality seems ambiguous
<hdv> dbaron: kind of like 'any user must be able to'?
<masonf> Proposed resolution: the spec should say that any user "must" be able to show interest via some input modality.
<Luke> +1
<keithamus> +1
<hdv> +1
<flackr> +1
<masonf> RESOLVED: the spec should say that any user "must" be able to show interest via some input modality.
<dbaron> +1
<brecht_dr> +1
mfreed7 commentedon Aug 26, 2024
Here's a new idea for touch, from an internal discussion (credit to @b1tr0t):
On touch platforms (or potentially any platform where the UA determines that there's no mouse/keyboard?) the UA adds a pseudo-element button (such as ℹ️) next to the
interesttargetsource element. That button can then be invoked in the normal way to indicate interest in the source element. And the pseudo element should be available for custom styling via CSS. Perhaps the button can be apopover=manualanchor-positioned to the source element? Just to avoid layout shift on touch platforms.This idea gets around the problems of using long-touch, and is actually a cow-path paved by several design systems.
Agenda+ to discuss.
b1tr0t commentedon Aug 26, 2024
Adding in here that this is a pattern that is a fairly common pattern, for example commerce checkout flows. Smashing Mag did a writeup a few years ago that covers tooltip patterns, including this one.
https://www.smashingmagazine.com/2021/02/designing-tooltips-mobile-user-interfaces/
css-meeting-bot commentedon Aug 29, 2024
The Open UI Community Group just discussed
[interest invokers] Touch inputs.The full IRC log of that discussion
<hdv> masonf: this is about interesttarget and interest invokers<hdv> masonf: webkit folks are against this feature because it is not well defined on toch
<hdv> s/toch/touch
<hdv> masonf: there are solutions for touch and keyboard
<gregwhitworth> q+
<hdv> masonf: we actually resolved the spec for interesttarget would say it should cover touch but doesn't say how
<hdv> masonf: it's kind of nebulous which understandably the webkit folks don't particularly like
<hdv> masonf: so we're looking for something that works across the board. Touch is very overloaded. When you try to set target on something that is not a button, eg to provide a definition for the text in a <span> … there is a couple of things that could happen on touch, you could long touch to copy paste, also to show a context menu…
<hdv> masonf: now if we add interesttargets and devs start using them everywhere, then copy pasting and context menus are harder to use
<hdv> masonf: idea: on some platforms, an extra button shows up when there is an interest target, then when you click on that button that indicates you have interest in that target
<hdv> masonf: this would be a lot more discoverable and a lot more out of the way… and it could have a pseudo element that is fully stylable
<hdv> masonf: could also be a popover=manual that is anchor positioned
<una> q?
<una> q=
<una> q+
<hdv> masonf: curious what use cases would be broken by that
<gregwhitworth> ack una
<sanketj_> q+
<hdv> una: very interesting approach that I really like… but it seems like this means there would be different use cases in mobile vs desktop, which authors would need to separately author
<hdv> una: could use a pointer media query that checks for touch input
<hdv> una: you wouldnt want that on desktop if you had a pointer device, you wouldn't want that on mobile (using mobile as shorthand for no pointer)
<scott> q+
<hdv> masonf: yes idea would be this button only shows up when you have a coarse pointer
<hdv> una: really like the idea of handling this with some kind of click handler on certain pointer devices
<hdv> una: a developer should have the ownership on when and how it appears
<hdv> una: eg the github preview repo might look differrent than a preview card on social media… should prob be up to the author
<hdv> masonf: agree it should be author styleable but with default that it shows up
<hdv> masonf: does it sound reasonable to make it show up by default?
<hdv> una: worry that developers might get things they are not expecting
<hdv> masonf: if we make it a popover that is anchor positioned, that probably doesn't have weird side effects as it doesn't affect flow layout and positioning
<hdv> una: still think it obscuring content would be a problem
<hdv> una: can see it get really messy really quickly
<hdv> gregwhitworth: is there historical precedence we can lean on with touch events moving to pointer events… as we don't know every form factor now and in the future
<una> ^especially if there is a dense layout with interest invokers
<una> ^people use the interest modality to help with data visualization on dense layouts
<hdv> gregwhitworth: what we put forward solves the problem, but worry that setting vision aside would cause problems along the way
<hdv> gregwhitworth: if we start defining what happens on hover by user agents I think we'll get pushback
<hdv> gregwhitworth: I agree with una, we could end with issues
<gregwhitworth> ack gregwhitworth
<gregwhitworth> ack sanketj_
<hdv> gregwhitworth: you could probably not either/or any of this, eg lots of users would use touch and then also mouse, I used to on Surface
<hdv> sanketj_: yes there are devices that have keyboard, mouse and touch, not just Microsoft's… so the risk of getting heuristics wrong is real
<hdv> sanketj_: I know Chrome, on desktop touch, has a menu that shows up on touch, that has compat concerns
<hdv> sanketj_: I too worry side effects could happen, not sure if there is a good interoperable option we could decide on
<gregwhitworth> +1 to what Sanket just said
<hdv> sanketj_: can we define, if interesttarget is set and long touch is done, can we define that other actions like context menu and copy/paste just aren't available
<gregwhitworth> q?
<hdv> masonf: I think users would find that annoying
<hdv> q+
<hdv> masonf: on my iOS device, if I long press a link I want to copy/paste it, instead I get a giant preview… I don't like that… and also developers, you're removing a previous capability they had
<hdv> sanketj_: I see… probably not as much as issue for a button, but would be for additional things
<hdv> masonf: agree, button is prob not a problem here
<masonf> q?
<gregwhitworth> ack scott
<hdv> scott: I like the idea, it's interesting
<hdv> q-
<una> q+
<hdv> scott: would be curious to see what other browsers come up with… would be interesting to allow developers to style it, but not sure if developers should be able to decide whether to show/hide it
<hdv> scott: because it's ultimately about the user, they are first in everything we do
<brecht_dr> q+
<hdv> scott: could imagine a bare bones user agent representation of it while we ensure users can get to the content
<gregwhitworth> ack hdv
<gregwhitworth> ack una
<hdv> una: want to respectfully disagree with an example… am looking at an example right now that I think would be a worse user experience if automate
<hdv> s/automate/automated
<hdv> una: [shows GitHub home page, hovering over links where each individual link to a name of a repo as well as an image, each of these shows a popover on hover]
<hdv> una: if we add an extra button to show these on mobile, there would be a lot of buttons
<Penny> q+
<hdv> una: I think we'd degrade the user experience if we cluttered up the UI with lots of buttons, especially in this example where all these are links
<hdv> scott: actually I agree authors should be able to turn this off but users should be able to override
<hdv> una: do you envision the user control to be display settings for the user where they could force interest els to show?
<hdv> scott: yes
<gregwhitworth> ack brecht_dr
<hdv> una: I think that'd be a good way to do it, gives the user control and allows them to see if it makes things better
<hdv> brecht_dr: +1 to not wanting too much clutter
<hdv> brecht_dr: as a user I don't want to think about the difference between desktop and mobile…
<gregwhitworth> ack Penny
<sanketj_> q+
<hdv> Penny: I think it'd be good if there is a global and a per case setting, and a user pref that overrides everything
<masonf> q+
<hdv> Penny: maybe with the right combination of settings we can overcome the challenges
<gregwhitworth> ack sanketj_
<sanketj_> I'll type in my question.
<gregwhitworth> q+
<hdv> gregwhitworth: is there a preference for something that we are going to standardise as a user preference?
<gregwhitworth> ack gregwhitworth
<hdv> gregwhitworth: users and developers would have to be able to rely on the setting existing
<hdv> masonf: I don't think we've ever standarised on a setting like that
<hdv> s/we've/we can or have
<hdv> s/standarised/standardised
<bkardell_> q+ to say I suggested this for tabs
<hdv> gregwhitworth: looks like no webkit folks here… if I put their hat on… they'd probably expect this to be on by default?
<sanketj_> The unavailability of hover on touch is a general problem. Should we think about having recommending/mandating UAs to provide a option (ex. contextmenu option) to view the invoker target on long press?
<hdv> masonf: that is kind of the backup plan I think
<hdv> masonf: I did here some pushback on that too
<hdv> masonf: feedback I heard was it would be a lot of clicks to show interest
<gregwhitworth> ack masonf
<hdv> masonf: thanks all for the feedback today… some of this changed my opinion on things. Global on/off seems to be the right thing, not per platform
<hdv> masonf: little icon should be on or off across the board and developer can change this
<hdv> masonf: we can show a little i-icon when folks use interest and make it very easy to turn it off
<bkardell_> s/is there a preference for something/is there a precedent for something
<brecht_dr> q+
<hdv> masonf: was pushing for popover to keep it out of flow before but not sure on that now
<gregwhitworth> ack bkardell_
<Zakim> bkardell_, you wanted to say I suggested this for tabs
<sanketj_> I think I like the "backup plan" option better. Maybe the requirement would be that the UA needs to provide some type of UI to view interest - what that looks like may vary. Agree that the context menu has its limitations.
<hdv> bkardell_: it's come up a few times over the years… I don't think we have ever done that but it does keep coming up
<chrishtr> I really like the idea of showing the pseudo element icon by default on every platform; developers can then remove it / restyle it as needed.
<hdv> bkardell_: maybe there isn't a good answer… and UA nor author can provide it, it's really a user preference thing
<hdv> bkardell_: so maybe the best thing we can do is to make it very easy… if it's not observable that's probably easy, if not it's a bit harder
<gregwhitworth> ack brecht_dr
<hdv> brecht_dr: to masonf's earlier point… I think if we go that route we should be able to style the icon as well. And then there could be some other solutions on touch devices
<hdv> masonf: proposal definitely was that it would be a pseudo element that could be styled in all the ways pseudo els can
<hdv> una: curious to hear feedback from Apple on this
<hdv> una: I think it's a very interesting path forward
<hdv> masonf: I think next step would be to write out the proposal and maybe have the discusson on the webkit thread that already exists on this and has a lot of discussion already
<gregwhitworth> Zakim, end meeting
mfreed7 commentedon Aug 29, 2024
Great discussion just now, thanks all. So I'm coming down to a more concrete proposal:
The idea would be that both of those elements (the button and span) would generate pseudo elements that could be targeted like:
which would be presented as:
Clicking those
?buttons would trigger the interesttarget target element. The buttons could be made fully accessible, they would be part of the sequential focus navigation, etc.To address the concerns raised in the meeting:
::interest-target-iconpseudo element would always be generated for any element that has aninteresttargetattribute. This would not be dependent on pointer event precision, etc.interesttarget, but would be styled (by default) asposition:staticso that no content would be obscured. However, developers could change that toposition:fixedand anchor-position them, if desired.?icon and activating it. This also removes the need to make<span interesttarget>keyboard focusable.::interest-target-icon(even when developers have hidden it), and 3) never show those.57 remaining items
keithamus commentedon Nov 26, 2024
@mfreed7
Yes this, but to expand and tweak slightly, I don't think the attribute should need a value, instead use either textcontent or accname computation right? Also to confirm, I think choosing one of the menu items should use the regular machinery e.g. dispatch a
clickevent and trigger activation behaviour.@nmn
Presumably you'd hide all interactive controls in the preview right? So I think a pseudo class to know that the container has been used as a preview card would be useful, so that all controls can be hidden.
scottaohara commentedon Nov 26, 2024
A popover dialog with a localized name probably. Not sure the value in a new role. Particularly if it’s to behave very similarly to a dialog anyway.
“Maybe” the role description could be modified by browsers? But unless there would be larger plans for this popup outside of this use case, I’m not sure it’d be something that should get its own role that authors could then use willy nilly?
nmn commentedon Nov 27, 2024
Yes, this could be an at-rule as well. We just need to detect if the preview is interactive (like on desktop) or not.
It does behave like a dialog on touchscreens, but if we remember that this proposal is a "hovercard" it works very differently than dialogs on desktop. The "dialog" role might still be the correct role, but I think we need to have a discussion about it because it's not a typical interaction model. Perhaps, it's a "non-modal" dialog which is not very well defined in the specification. (FWIW, I just worked on a new more accessible hovercard implementation and used the "dialog" role today to make it work and it does mostly work.)
💯. I don't think the new role need to exist as something that authors should be able to use, but just a new role behind the scenes that the UA can control.
mfreed7 commentedon Dec 17, 2024
Ok, after a bit of internal discussion (thanks @argyleink and @chrishtr), here's another proposal. My hope is that this one satisfies most of the requests on this thread:
interesttarget.a. The site will continue to be rendered, importantly unblurred, underneath the UA provided menu.
b. The UA will place the UA-provided menu somewhere on-screen, attempting to leave as much of the physical screen area un-obscured. For example, toward the bottom of the screen, leaving the top available.
c. New CSS
env()values will be added (subject to bikeshedding) forcontext-menu-inset-top,context-menu-inset-right,context-menu-inset-bottom, andcontext-menu-inset-left. These will allow a hovercard to be positioned safely within the still-visible space left on screen, so that both the hovercard and UA menu can co-exist.With the above system, the mockup should be able to look just like #1052 (comment), but that will require more work on the part of the developer, to be sure to position the hovercard appropriately, and likely blur the rest of the screen to avoid visual clutter? That last thing might even require that the hovercard is a modal
<dialog>rather than a popover, but that should also be do-able viainteresttarget.Open questions:
interesttarget? What's the behavior?context-menu-inset-top, etc?<a href=foo interesttarget=bar>? It would seem to me thatinteresttargetshould take precedence, since it's likely providing a "better" link preview, customized to the site.nmn commentedon Dec 17, 2024
@mfreed7 No notes. Perfect!
I think disallowing interesttarget within hovercards is an acceptable solution for now. Although it should be possible to open a second dialog within a dialog and make this work if needed.
sorvell commentedon Dec 19, 2024
@mfreed7 #1052 (comment) seems good and similar to my option 1.
My understanding is that you raised this as a security issue. Was that resolved?
mfreed7 commentedon Dec 19, 2024
I asked some experts and they (also) told me my concerns were misplaced. See the comment here: #1052 (comment)
Good to know that you think this would be ok. I also think it might be possible to support it, which I'd like to do, because on desktop environments, it would make complete sense to have nested interest targets. (Facebook has these already 😄 .) Perhaps when in long-press mode, and you long-press an interesttarget element on a showing hovercard, it just "works"? I.e. the new nested hovercard is shown, which (with developer styling taking care of this) takes the place of the first hovercard, and the UA menu continues to show?
css-meeting-bot commentedon Dec 19, 2024
The Open UI Community Group just discussed
[interest invokers] Touch inputs.The full IRC log of that discussion
<bkardell_> masonf: both of these next two are about interest invokers - this one is about touch input patterns<bkardell_> masonf: I posted a new idea for this one, which I think gets everythingI heard/enables all of the use cases
<bkardell_> masonf: on touchscreen you have an element with interest target, and you long press it - two things happen simultaneously- the target gets invoked a thing shows up and the user agent menu shows up - the new thing is that the menu shows up more like an onscreen keyboard, not covering the whole thing
<bkardell_> masonf: the idea is that the developers positions it in the free area - we provide some css env variables that let the developer see where is the free space - what are the boundaries. I think you get the best of all worlds, you can have the hover card and the user agent can show the menu
<bkardell_> masonf: I think it even enables nested hover cards
<brecht_dr> q+
<masonf> ack brecht
<bkardell_> masonf: there are some open questions - main question is what is not solveable
<bkardell_> brecht_dr: how does it work with interactive elements inside the carrd
<bkardell_> masonf: the beauty is I think it just works... it is just part of the page.
<bkardell_> brecht_dr: I am assuming that that space automatically has some overflow so that if it gets screwed up you can get to it
<bkardell_> masonf: the key thing here is that it is up to the developer - I am telling you where will not be obscured
<bkardell_> q+
<masonf> bkardell_: to brecht's point, why would that area not be scrollable? Or have overflow? You don't want to clip it.
<bkardell_> masonf: it's like layout viewport, visual viewport - it just shows you where to lay it out... you can fix position stuff - the way I see you using is you can fix position using those offsets...
<bkardell_> masonf: I don't think any of that can or should be automatic
<masonf> ack bkardell
<bkardell_> brecht_dr: the only concern I have is that this is another thing you'll have to learn, if you don't you might wind up with a thing you don't want - in those cases you'll have to test it on a device to see it happening which is complicated
<bkardell_> masonf: I agree, I share that concern - the biggest concern is that you just develop on desktop and then you don't know what happens on mobile and someone can't get to it all of the sudden
<bkardell_> masonf: we ran into similar concerns with customizable select
<bkardell_> masonf: we explicitly went against UA defaults bc that made it harder. We can't have both, so if we try to make it perfect by default it's harder
<scott2> q+
<bkardell_> brecht_dr: I feel like this is different - In this case I wish there would be a good default
<bkardell_> masonf: the thing that needs styling is the hover card - a popover or a dialog - I think what you are suggesting is a UA default that in _some_ situations would solve this
<masonf> ack scott
<bkardell_> scott2: I would be very happy if there was some level of default ua styling - to at least account for any thing invoked by an interest target at least remained within the confines of the viewport. I have never encountered a situation where a developer would want a thing like this to be obscured/half off screen and just unable to get to it
<bkardell_> masonf: I am only hesitating at "How?" and looking back to what we tried with <select>
<bkardell_> masonf: I think that was kind of roundly rejected because devs would want to undo too much.
<bkardell_> scott2: I don't want to speak too broadly but people.... don't always do that... or even often
<bkardell_> masonf: I would need to give it some thought. I think, but I could be wrong, that you need some pseudo class that tells you when a popover has been invoked by one - and we don't have that right now
<bkardell_> +1
<masonf> bkardell_: let's just make it easy by default, if I haven't thought about it.
<bkardell_> scott2: if it wouldn't be in the UA sheet by default, that makes sense, give them a pseudo class - kick the can down the road a little bit, but make it really easy
<bkardell_> masonf: so the very specific thing is that we'd ask for a pseudo class for this very specific situation
<masonf> q?
<bkardell_> masonf: let me think about it a little, it was a good discussion, but I don't want to resolve on that just yet
nmn commentedon Dec 21, 2024
💯 it's a nice to have but we would totally ok with removing nested hovercards. We might do that soon anyway as we are trying to make the current implementation as accessible as possible and nested hovercards are a challenge.
github-actions commentedon Jul 9, 2025
There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label.