On the semantic web 34 ▲ Karl Koch 55 days ago · 6 min read1106 words · Tech · hide · 4 comments The easiest way to make an interface harder to maintain is to rebuild the browser badly. A div can look like a button. It can be given a click handler, a pressed style, a hover state, a focus ring, an ARIA role, a keydown listener for Enter, another one for Space, a disabled class that hopefully also blocks interaction, and enough attributes to convince assistive tech that it is interactive. Or it can be a button. That sounds obvious until you look inside a lot of modern component libraries. The visual layer is treated as the source of truth, then the behaviour is patched back on afterwards. It works in the demo. It usually works with a mouse. Then someone tries to tab through it, submit it from a form, use it with VoiceOver, disable it properly, or nest it inside a more complex flow, and the component starts leaking implementation detail everywhere. Semantic HTML is not an accessibility chore. It is interface infrastructure. The fake button The custom version usually starts like… Log in to reply on the Fediverse. Comments will appear here. birdbrained :BirbMgpi: @crowy@squawk.social 55 days ago [-] holy shit THIS. I sometimes see webdevs doing the freakiest shit instead of just?? using the native element. details/summary is SO underused. 😭 Clare Hooley @clare_hooley@mastodon.me.uk 55 days ago [-] although on accordions, I def. want easy ‘animated height orchestration’ and I believe it is a well-known missed opportunity that animation wasn’t built into the specs for the <details> element John Harris @rodneylives@mefi.social 53 days ago [-] Good article generally, although the title is misleading in that it has nothing to do with the old "semantic web" idea, it's more an argument to use native HTML elements rather than reinventing the wheel with custom controls on websites Mal J Brown 🌐 @mjbrown@mastodon.social 49 days ago [-] @bubbles Yes, this article is about Semantic HTML, with which I agree. However, it is not about [The Semantic Web](https://en.wikipedia.org/wiki/Semantic_Web), which is about data and metadata semantics, encoding ontology for describing concepts, relationships between entities, and categories of things.