The UX of HTML (2023)
Vasilis van Gemert emphasizes the importance of user experience in HTML, advocating for teaching interactive elements first to engage learners and improve accessibility, shifting focus from semantics to practical UX applications.
Read original articleVasilis van Gemert discusses the importance of user experience (UX) in HTML, emphasizing that a well-designed user experience begins with properly structured HTML. He notes that many web developers, including his students, often overlook semantic HTML, leading to poor user experiences on websites. By reframing the conversation from semantics to UX, he finds that students become more engaged and interested in understanding how HTML elements function and contribute to user interaction. Van Gemert highlights the significance of interactive elements, such as links and form fields, which enhance accessibility and usability. He critiques the traditional focus on semantic purity, arguing that it often complicates understanding without providing clear UX benefits. Instead, he advocates for teaching the practical applications of HTML elements first, which can excite learners about the potential of web design. He believes that once students grasp the interactive aspects of HTML, they will be more receptive to learning about the subtleties of semantics. Van Gemert expresses hope for future discussions in web conferences to center around the practical UX implications of HTML rather than theoretical semantics.
- User experience in HTML is crucial for effective web design.
- Many developers neglect semantic HTML, leading to poor user experiences.
- Teaching interactive elements first can engage learners more effectively.
- The focus should shift from theoretical semantics to practical UX applications.
- Understanding interactive HTML elements enhances accessibility and usability.
Related
Microfeatures I love in blogs and personal websites
The article explores microfeatures for blogs and websites inspired by programming concepts. It highlights sidenotes, navigation tools, progress indicators, and interactive elements to improve user experience subtly. Examples demonstrate practical implementations.
Htmx: Simplicity in an Age of Complicated Solutions
Erik Heemskerk discusses the pursuit of a 'silver bullet' technology in software development, emphasizing simplicity over complexity. He critiques over-engineering in front-end development, highlighting trade-offs in code solutions for better user experiences.
Don't Use JavaScript for That: Moving Features to CSS and HTML [video]
The video discusses the benefits of using HTML and CSS over JavaScript in web development, focusing on efficiency and inclusivity. It demonstrates creating custom switches with HTML checkboxes and CSS, emphasizing accessibility and styling techniques like "appearance: none".
Show HN: Plain Vanilla – a tutorial website for vanilla web development
The article discusses web development using only HTML, CSS, and JavaScript, emphasizing Web Components and modern CSS. It encourages experienced developers to explore this simpler, standards-based approach for building applications.
From React to Htmx on a real-world SaaS product (2022) [video]
David Guillo shares his experience replacing React with htmx in a SAS product, highlighting htmx's advantages for creating rich user interfaces without JavaScript frameworks, emphasizing accessibility and ease of use.
Best known are checkboxes that can't be styled. But they're still needed, so they're hidden and overlaid with pseudo elements. Now you already have the box, :before, :after and the label and :checked special style. Oops. Better also load a whole font to even render the check mark consistently.
The select and option elements are also terrible. So terrible in fact that iOS breaks its own guidelines and instead shows a new page with all options listed. Example: Language selection. Then there's the developer experience. Can JavaScript stop a selection? Can I hook up an element handler for change? And so on.
I strive to use the "correct" elements, but they do have serious shortcomings.
Using the correct elements isn't necessarily about doing things "right" for the sake of being right, it's about making things easier for you and your users. Easier for you because usually the right semantics are in place already, and you just need to tweak some colours and styles and get things looking how you want. Easier for your users because the elements will do what they expect when they try to right click, middle click, use a screen reader, etc.
The UX angle makes it clearer that the aria tags or semantic elements aren't the goal in and of themselves.
In other posts about programming languages, you can't write invalid code because the compiler will complain and stop. When the browser fails to render your HTML, one complains about HTML and rants about how it was developed in the 1990s while forgetting that their own programming language might have been developed long before that.
I've been developing web sites commercially for 25 years. I have no such issues making highly performant, modern and cool web sites.
I've read a lot of stackoverflow, did a lot of arcane css, learned a bunch of display:table obscurities, and still every option broke somewhere, UI wise. Presumably, some magic combination of css incantations should work.
But I can't spend 2+ hours on a table, and even if it seems to work, I can't guarantee it will continue to work or break subtly on some edge case. And this is very basic stuff, UI wise. I've setled for div/class soup, gridlayout, and a few aria selectors.
With single-page apps and the like, even with early jQuery, it seems we overload the HTML language to do so much when it's so often just used as a tree of nodes w/ no meaning until you get to a node.
This for example is very wrong if you take accessibility into account:
> Yes, I know that some sectioning elements actually have some UX attached to it. But not that much UX if you compare it to the real interactive elements. Not getting your heading levels right is not at all as destructive as using divs instead of links.
We often forget about accessibility users, not because we don't care about them (well, sometimes that too, I'm sick of hearing "we can't spend that much time on such a small percentage of users"), but because we are not even aware of how accessibility tools make use of the semantics around HTML. We don't live in the "accessibility world" and it's not ingrained in our development practices so it doesn't even cross our minds. We already fail at non-accessible UX (as the article correctly points out; which BTW also affects accessibility) so how can we not fail at providing the means to navigate via tools we don't even use?
I've recently been tasked with fixing a web app to make it more accessible (due to government mandate), and using a screen reader to debug has been an eye-opening experience (no pun intended). I wish every developer tried a screen reader at least once.
For example, do you know how important the different WAI-ARIA patterns are? See for example the alert pattern[0] or how landmark regions[1] (which the paragraph above dismisses as having very little UX) help accessibility users navigate.
Have you ever tried the full-page accessibility tree [2] in the browser's devtools?
There is so much hidden UX that we take for granted as sighted users, such as communicating field set relationships visually (by having related fields be close, or e.g. padded at the same level) instead of providing accessible UX like grouping those under an actual properly labeled `fieldset`.
I know it's not your fault as a sighted user (out of sight, out of mind; goes both ways) but I'm a little saddened by the state of accessibility good practices -- both because they're not taught anywhere and because the platform sometimes fights against us (e.g. as one of the other threads points, manually setting heading levels is a pain in the ass).
Accessibility users should be able to navigate the web too. And not only those with visual impairments -- proper accessibility is not only for screen readers.
[0] https://www.w3.org/WAI/ARIA/apg/patterns/alert/
[1] https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/
[2] https://developer.chrome.com/blog/full-accessibility-tree
Already the first part (HTML as the basis for universal web publishing of all kinds of documents) is quite unprecedented in scope. Did the print world of physical books and newpapers ever produce a global "semantics and shit" paradigm? No. Within the walled gardens of a major publisher or the walls of a monastery reproducing manuscripts there may have been consistently followed rules.
In other words: we never had anything better. The current focus on "apps" is just turning a difficult situtation into a hopeless one.
There might some limited scope for something more rational / pleasant in the world of CMS's, together, e.g., with the adoption of HTMX type technologies. If your pages/documents are derived more or less from a standard schema in the backend then its is quite efficient to develop a corresponding structure of components on the frontend.
When people realise how much functionality you can get for free using semantic tags they get right on board and start seeing html as a tool rather than simply labels that some pedant insists can’t all just be divs.
That leaves a long tail of "specialized" HTML consumers and usecases, such as screen readers, niche search engines, open source projects or scientific projects that actually would benefit from consistent, widely-used semantic HTML (to an extent), but don't have the market power to push the world in that direction.
However, those still have the "founding vision" of HTML on their side, that browsers rely on for their brand reputation. So browser vendors can't simply say out loud "look guys, you lost. HTML today is for showing stuff in a browser and running javascript and nothing else, deal with it".
The result seems to be that the "semantic" people get to claim the "moral" victory of how HTML "should" be. They are encouraged to spread their vision at countless web Dev conferences, under the enthusiastic support of the browser vendors - while they are doing absolutely zero to support that vision in actual browser implementations.
just do what ever works. non of this matters. its just talking points by people that wanted to stay relevant.
as soon as I started to ignore these kinds of people i suddenly became able to just make things.
Semantic HTML is the wrong paradigm entirely.
Related
Microfeatures I love in blogs and personal websites
The article explores microfeatures for blogs and websites inspired by programming concepts. It highlights sidenotes, navigation tools, progress indicators, and interactive elements to improve user experience subtly. Examples demonstrate practical implementations.
Htmx: Simplicity in an Age of Complicated Solutions
Erik Heemskerk discusses the pursuit of a 'silver bullet' technology in software development, emphasizing simplicity over complexity. He critiques over-engineering in front-end development, highlighting trade-offs in code solutions for better user experiences.
Don't Use JavaScript for That: Moving Features to CSS and HTML [video]
The video discusses the benefits of using HTML and CSS over JavaScript in web development, focusing on efficiency and inclusivity. It demonstrates creating custom switches with HTML checkboxes and CSS, emphasizing accessibility and styling techniques like "appearance: none".
Show HN: Plain Vanilla – a tutorial website for vanilla web development
The article discusses web development using only HTML, CSS, and JavaScript, emphasizing Web Components and modern CSS. It encourages experienced developers to explore this simpler, standards-based approach for building applications.
From React to Htmx on a real-world SaaS product (2022) [video]
David Guillo shares his experience replacing React with htmx in a SAS product, highlighting htmx's advantages for creating rich user interfaces without JavaScript frameworks, emphasizing accessibility and ease of use.