3 ms·
> So basically you're abusing the fact that (modern) browsers treat unknown tags more or less as divs and built a small CSS framework with these names. The spe
by masklinn 7y ago
> So basically you're abusing the fact that (modern) browsers treat unknown tags more or less as divs and built a small CSS framework with these names.
The spec allows custom elements[0] and pretty much requires this behaviour.
> you're breaking all HTML semantics and your markup is not accessible.
Calling the markup non-accessible is defensible[1], but it doesn't break HTML semantics in any way.
[0] https://html.spec.whatwg.org/multipage/custom-elements.html#autonomous-custom-element https://html.spec.whatwg.org/multipage/custom-elements.html#...
[1] though it wouldn't be more accessible as a stack of divs and the custom element can be aria-tagged[2], in the browsers supporting it it's also possible to use customised elements but here there's little of interest
[2] https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-autonomous-drawbacks https://html.spec.whatwg.org/multipage/custom-elements.html#...
- playpause 7y agoThe Custom Elements spec requires all custom elements to have a hyphenated name.
- matt-tingen 7y agoCustom element names must contain a hyphen for forwards-compatibility, and these do not. https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name https://html.spec.whatwg.org/multipage/custom-elements.html#...