-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AbortSignal for popover.showPopover() for initialize internal CloseWatcher #10428
Comments
The solution you present that exists today is different to the mechanics of Can you explain the broader motivating use case for this please? Are you trying to make time sensitive UI? Time based UI is not in conformance with WCAG 2.2.3 and so ideally we would not encode such patterns into the web. |
Yes.
As spec itself describes in example, there are use-cases which close after timeout period. setTimeout(function () {
outSpan.hidePopover();
}, 10000); https://html.spec.whatwg.org/multipage/popover.html#the-popover-attribute for Example, OpenUI toast proposal also mentions that.
Toast was the origin of popover proposal ( |
I'm aware of the general use case but I was more directly asking you for your use case. Making something allowable per the expressivity of a primitive, and encoding something into the standard as an ordained pattern are two different things, however. We need to be careful that we are not creating solutions which make it far easier to fall out of conformance with WCAG. |
I don't make sure this guideline really applicable for popover too.
I think not all of popover requires "user activity to complete", because if you require activation (input anything, require submitting etc), that should be done via
I agree that, but it depends on understanding of WCAG 2.2.3 for me. |
Right.
The test procedure is quite clear on WCAG 2.2.3:
Any interaction that is timed fails the criterion. A Going back to the original request though; the |
That's my fault, so it just fine with
Interesting. I'm keen to see comments from others too. |
Came here to say this. CloseWatcher's signal is for use to for example cleanup on element removal. Popover (and modal dialog)'s close watcher has this behaviour built in so we don't really need a signal in the close watcher sense. If we imagine that signal will call hidePopover instead. Then other than a timeout case (Which may or may not be bad), most other signal patterns don't seem to apply? |
FYI:
|
What problem are you trying to solve?
popover
has a CloseWatcher internally, and CloseWatcher has AbortSignal option.Closing popover with timeout is a common use-cases I believe, but
showPopover()
doesn't accept any option.You should do that manually, like described in Spec example
But currently, AbortSignal is a common practice to handle Async Timeouts. So it'd be nice if popover accepts AbortSignal like below for passing it into internal CloseWatcher.
What solutions exist today?
How would you solve it?
Add PopoverOption to showPopover(). Same as CloseWatcherOptions
Anything else?
No response
The text was updated successfully, but these errors were encountered: