Open brechtDR opened 1 month ago
Sounds like the same issue as this? https://issues.chromium.org/issues/40281699
yes, same issue; I was chatting with Brecht about this because the original issue fizzled out, but I still think that stopping media playing in a popover when it's dismissed is expected behaviour for 99% of developers, but it isn't possible declaratively at the moment.
Recently at a conference someone came with a question to me.
When a video is playing and a popover gets closed, you still hear the video in the background (so it isn't stopped) This results in an unwanted behaviour in most cases.
I was wondering what would happen when combining popovertarget and commandfor in this case: Here is a quick codepen link
And (quite understandably as previously discussed) a commandfor takes precedence over the popovertarget. I understand this as we want popovers to work with invokers as well, but my question is rather about the use case than the "hack" I was trying to pull in that demo.
So a few questions I want to ask, just to make sure we don't forget:
Shouldn't there be a way to kill items playing inside of a popover without the use of JavaScript? Can we maybe revisit this with invokers? Is there any way that a video still playing when a popover is closed is a wanted behaviour? (And when this happens, isn't that just bad A11Y as well, i wonder?)