3 ms·
What does "distinguish the user interface actions" mean here? The browser knows the <button> that's a child of <select> is special, and activates the popover o
by jaffathecake 2y ago
What does "distinguish the user interface actions" mean here?
The browser knows the <button> that's a child of <select> is special, and activates the popover on click. This is handled automatically, as is the accessibility tree.
- Y-bar 2y agoIf it is special, why not use a new element and not one with a history and a clear use today? From my experience it seems to muddle the concept of the existing element. An <a> for example never behaves differently depending on if it is part of a (DOM) tree with a <div> or a <p> as a parent/grandparent.
- jaffathecake 2y agoIt does. An <a> doesn't work as usual when it's within a <button> for instance. <button> already behaves differently depending on the type of form it's in, or whether it's in a form at all. Let me put it another way: If you use a <select> today, what's the difference between the thing that renders on the page and a <button>? They look different, sure, but that's a matter of styling. You can already style a <button> to look like a <select> activator. They can receive focus, and they can be activated. They're buttons.
- Y-bar 2y agoAdding another gotcha will help no-one. This line of argument reminds me of Plat's "featherless bipeds" as a definition of man. Everything's a button if you are ambiguous enough, sure. It's not _wrong_ but it also dilutes things to where semantic meaning no longer exists.