135 points · by lifthrasiir · 2y ago · 70 comments
HTML is and always was very error tolerant though.
Accessibility software is rather brittle even when you do everything right. It's a bad idea to push it.
I would pay money for a browser plugin that restyles every web page to a single readable/accessible design that I like. Think "Reader Mode" on steroids (that could transform arbitrary GUIs, not just blog posts).
What about the people who can't use the web now?
Sometimes designs you don’t like are intentional.
Eg:
<my-dalek>EX-TER-MIN-ATE</my-dalek>
You can style them, including setting them as block level elements.
Where it can make life a lot easier is when you have a large number of nested divs. If you give the div's distinct names, it makes debugging/editing the source easier, which is probably required if you have that many divs.
https://html.spec.whatwg.org/multipage/custom-elements.html#...
Tag names with at least one hypen and two words either side are reserved for custom element use... with a few exceptions that I assume were part of the HTML/svg/mathml spec before the custom element registry.
- annotation-xml
- color-profile
- font-face
- font-face-src
- font-face-uri
- font-face-format
- font-face-name
- missing-glyphIf everything is a span, everything becomes just text.
It doesn't only apply to screen readers. Regular actions like keyboard navigation becomes broken. For example, on the page, you cannot tab between "click to expand" "buttons".
And so on and so on :)
> actions like keyboard navigation becomes broken
is also an accessibility issue. Not everyone can use a mouse. Keyboard navigation should be the easiest possible thing to test and ensure works…
Edit: it's also where table got a bad rap (for a while table wasn't even used for tables, it was completely taboo). Using table for layout completely wrecked accessibility.
The only thing I’ll grant you is that my first example’s benefit is a marginal difference, but there is a benefit nonetheless. It was also probably pushed as much for the screen reader benefit as it was for the ability to parse and extract information if I’m feeling cynical, but I digress.
> External scripts can be fetched and evaluated using `eval`
No! `eval` has some legitimate use cases, but generally should be avoided:
https://www.digitalocean.com/community/tutorials/js-eval#rea...
See also: https://stackoverflow.com/questions/30062864/where-do-the-bu...