Earlier quoted context omitted.
Native apps have to be installed. You don't want to give every power they have to random websites (say, that phishing domain at the top of a Google SERP), not for a very good reason. "My custom dropdown can't draw past the boundary of the viewport" isn't a very good reason.
Giving this capability to arbitrary web apps is definitely a bad idea, but conceivably it could be made available to installed PWAs in the same way things like the Window Controls API are: https://developer.mozilla.org/en-US/docs/Web/API/Window_Cont...
Popover API
141–150 of 166 posts
Re: Popover API
#142Demo https://mdn.github.io/dom-examples/popover-api
https://mdn.github.io/dom-examples/popover-api/nested-popove...
Re: Popover API
#143Earlier quoted context omitted.
This is the critical missing piece. Tried playing with and ship something with the new popover API last week, but missing positioning support in all browsers is really holding this back from more use-cases. Looks like the last browser (FF) has already shipped anchor positioning in beta, so it won't be long!
Aren't there only 2 browsers? There is Firefox and there are all the Chrome derivatives.
Uncommon and neither Firefox nor Chrome Derivatives: Netsurf, Dillo, Ladybird each have their own engines. A few browsers also use a Gecko fork called Goanna. (Pale Moon comes to mind first, but there are at least a couple others that use the same engine.) Then there's Konqueror. It's not common, but can either use old KHTML or WebKit (Safari's engine).
Re: Popover API
#144Earlier quoted context omitted.
The title attribute is not accessible, so its use is generally discouraged as an accessible label because screen readers can't pick it up (it's fine to use if you combine it with aria-label). Also, you can only show text in a title attribute, so the Popover API would allow you to add rich content to a tooltip (for better or worse :)) Edit: Remove extra "if"
> The title attribute is not accessible That's incorrect. There's nothing inherently inaccessible about the title attribute. Voiceover, for example, reads the content of title attributes. There are a bunch of reasons why title is pretty useless (the main one being it does nothing on every touch screen interface, where the concept of hover doesn't exist). But accessibility is not one of them.
I think we might be splitting hairs here. There are accessibility concerns with the title attribute. MDN describes why the title attribute is problematic from an accessibility perspective [1] and provides a list of links with additional details. That MDN page also indicates that the title attribute is problematic for:
- People using touch-only devices
- People navigating with keyboards
- People navigating with assistive technology such as screen readers or magnifiers
- People experiencing fine motor control impairment
- People with cognitive concerns
That's a non-trivial amount of web users. So is it technically accessible? Yes. But if you want to deliver an accessible experience to everyone, and the title attribute is going to cause issues, I personally would define that as not being accessible.
[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Global_att...
Edit: Formatting
Re: Popover API
#145Earlier quoted context omitted.
Every single app having to import the same popper library, for over a decade, indicates there's sufficient need for native support. I've also been a proponent of a combobox becoming native (for ex: a select box of Countries where you can filter by typing) https://www.w3.org/WAI/ARIA/apg/patterns/combobox/#:~:text=C... . and ideally multi-select for ex a tag selector.
That's the point. Why make the life easier for websites that display pop-ups. Pop-ups are pure evil.
Re: Popover API
#146Earlier quoted context omitted.
This is the critical missing piece. Tried playing with and ship something with the new popover API last week, but missing positioning support in all browsers is really holding this back from more use-cases. Looks like the last browser (FF) has already shipped anchor positioning in beta, so it won't be long!
Aren't there only 2 browsers? There is Firefox and there are all the Chrome derivatives.
Re: Popover API
#147Earlier quoted context omitted.
What about cookie consents?
Very much a anti-pattern. The entire concept of these is malicious compliance against the GDPR and not something that the GDPR requires.
Re: Popover API
#148Earlier quoted context omitted.
I just shipped a new article all about how to use the CSS anchoring API, which is landing in Chromium next week! https://developer.chrome.com/blog/anchor-positioning-api
I love articles with actual running examples, thanks! Now I'm wondering how quickly this will get adopted, it looks very cool!
Re: Popover API
#149in terms of accessibility, i imagine a universal standard for modal state management will be an improvement over the bespoke approach - closing when the user presses escape, focus handling, etc. but i really wish popover=hint made it into the spec. would have been nice to get a native alternative to tippy.js
Re: Popover API
#150Earlier quoted context omitted.
Aren't there only 2 browsers? There is Firefox and there are all the Chrome derivatives.
Safari and Mobile Safari are common and are neither Firefox nor Chrome derivatives. Uncommon and neither Firefox nor Chrome Derivatives: Netsurf, Dillo, Ladybird each have their own engines. A few browsers also use a Gecko fork called Goanna. (Pale Moon comes to mind first, but there are at least a couple others that use the same engine.) Then there's Konqueror. It's not common, but can either use old KHTML or WebKit…