Only <SPAN>s
onlyspans.net
onlyspans.net
onlysubs?
onlyslots?
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.
I shouldn’t need to author my own Chrome extension just to set a minimum font-size on pages or disable fixed background images over remote-desktop.
https://chrome.google.com/webstore/detail/stylus/clngdbkpkpe...
There's nothing about it in Chrome's help site either: https://support.google.com/chrome/search?q=user+stylesheet&f...
I mainly test with NVDA on the latest Firefox ESR on Windows 10. Something always breaks if I upgrade any part of this chain in my testing VM. Few months ago I spent many days to make abbreviations in a table header to be read correctly. I tried the abbr tag, abbr attribute, aria-label and many other possibilities and found a super hacky solution that involves hiding the expanded form with some css while exposing it to the screen reader. Then sometime after that I updated the Firefox. At the same day a colleague questioned why we needed all these hacks, and I wanted to show her how broken it was without my hack, but voila it had started working with the non-hacky, semantic way.
I have many stories like this.
I also do test with other configurations but just before releasing. VoiceOver (mac) is 80% there. JAWS Inspect is giving some colleagues headaches. None work 100% without breaking others, so the most popular stack decides how we implement things.
When I saw this post, I thought perhaps doing everything with spans and adding necessary attributes like role would be easier. Well nobody is passing something like that through a code review :)
Accessibility software is rather brittle even when you do everything right. It's a bad idea to push it.
I'd much rather use a <button> that exposes itself as such and has well known interaction functions, then create my own div and have to handle the clicks, keyboard navigation, navigation shortcuts and so on... That actually requires a lot more knowledge than HTML semantics, and unless you test frequently with expert and non-expert assistive tech users, you won't know what kind of UX issues you'll be creating for them...
Sure, but have you ever used a screen reader? Support for aira markup is often limited and if you confuse things with semantically muddled HTML you're almost guaranteed to degrade accessibility.
The more basic and "standard" you can keep your HTML the less likely users using assistive technology will run into problems.
Aria is great, especially the basic stuff like aria-label, but where you can avoid using it you should.
I've worked on accessibility projects for years, treating aria as a source of truth or something that can be relied on isn't a good idea. We might get there eventually, but we're not there today.
Great. Another developer that sees accessibility as another specs compliance fetishism exercise instead of actually being way to make things easier to use for more people.
HTML is and always was very error tolerant though.
The W3schools example is fairly decent https://www.w3schools.com/xml/xsl_intro.asp
Somehwhat similar to how component based JS frameworks work nowadays. Anyone who was using at a CSS equivalent was missing the point.
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.
Much later this was codified in HTML 5: if a browser doesn't know an element, it will render it as basically a span (that is, inline element with default styling IIRC).
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…
…until features start getting killed because they can’t be made to work well on screen readers. I’ve seen it happen and it strikes me as unfortunate.
Then realise: it's not just screenreaders. It's Braille displays, sip-and-puffs, Magnifier, High Contrast mode, keyboard navigation, speech recognition… Seemingly nobody tested any of it before they gave it to the end-user, so now it's your job, as the web developer, to make something that works.
Good luck! I recommend settling for "doesn't make it worse", since that's almost achievable.
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...