Hacker News new | ask | show | jobs
by torginus 21 days ago
Personally the biggest conceptual problem with HTML/CSS is that it's incredibly unintuitive with mapping to real-world concepts, and not low-level (or straightforward) enough so that the low-level primitives are easy to manipulate.

For example, WPF programs can have great accessibility - this comes from the fact that programmers can manipulate primitives which are semantically meaningful (buttons, lists etc).

In HTML its just a sea of divs which lately have become an implementation detail to hang classes on to, and sometimes not even exposed directly to the developer, if you use a SPA framework.

There's not a snowballs chance in hell you can build a quality accesibility solution on top of that.

HTML's main idea was that HTML was a document model, that described the content in a semantically meaningful way, and CSS was the 'rest' which kind of allowed to make the whole thing pretty - the idea going as far as separating content from looks should allow people to 'theme' their websites and completely redefine layout.

That idea has been completely abadoned. I'm not a frontend dev - although I can make a competent webpage by myself, I don't have deep insights into what's going on in the field - maybe Web Components will allow people to create semantically meaningful pages in a standard way?

Maybe there should be another layer of abstraction on top of what we have - which is truly semantic, this time for real?

1 comments

The sea of divs and the abandonment of HTMLs is a result of the poorly built frameworks. Actual HTML and CSS has not abandoned those core ideas, and the frameworks often reimplement native features badly (e.g. the shadcdn radio button example). HTML crafted with care is not a sea of divs, it is markup one can read that logically and cleanly describes what you see.