Live data from Hacker News

A Blog Post with Every HTML Element

patrickweaver.net

11–20 of 88 posts

Re: A Blog Post with Every HTML Element

#11

This comes up briefly but I do still find it ridiculous that there's no simple standard CSS declaration to hide something from visible display but keep it for screenreaders. Everything I've seen still does clip, or positions the content off the side of the page, or something like that. How is this not just an alternative "display" value, or an additional property? There's been a "speak" property floating around in on…

> no simple standard CSS declaration to hide something from visible display but keep it for screenreaders

ARIA attributes allow for that.

https://developer.mozilla.org/en-US/docs/Web/Accessibility/A...

Example code.

https://stackoverflow.com/questions/26032089/in-html-how-can...

Re: A Blog Post with Every HTML Element

#12

This comes up briefly but I do still find it ridiculous that there's no simple standard CSS declaration to hide something from visible display but keep it for screenreaders. Everything I've seen still does clip, or positions the content off the side of the page, or something like that. How is this not just an alternative "display" value, or an additional property? There's been a "speak" property floating around in on…

Why should it be a part of CSS, that handles visual representation, and not part of HTML, which handles data, structure, and semantics?

I wonder if a whitespace with a right aria-label could fit the bill.

Re: A Blog Post with Every HTML Element

#13

Has anyone ever encountered a real world scenario where you reached ?

Yep! The first tech job I ever had was at a hyper local marketing agency, so most of my time was spent updating restaurant menus and sales for little local stores.

The restaurant menus would always reach into insane levels of hierarchy, mostly because many of them made way too many things. Sometimes you need the:

Restaurant -> Menu -> Antipasti -> For Groups -> Fried -> Cheesy

hierarchy to feature the mozza sticks and arancini correctly.

Re: A Blog Post with Every HTML Element

#14
post #7

> Some of deprecated elements won’t render without some extra work, for example and are designed to be used instead of a , for I guess some kind of collage web page made up of other pages. The author is too young to remember frames, huh? :) I'd just link the Wikipedia article ( https://en.wikipedia.org/wiki/Frame_(World_Wide_Web) ), but I feel like it doesn't explain it very well. So, to briefly explain -- in the ear…

One usage of frames I recall was for sites that were meant to act as an index of other sites, where there’d be a sidebar on the left with links to various sites that opened on the right.

I think this was actually a pretty good use case for frames, especially back before browser tabs existed. It was nicer to run through a list of links in one window with frames than to jump back and forth through history or juggle multiple windows.

Re: A Blog Post with Every HTML Element

#15

Awesome article. Like the author, I'm also confused about when to use b and strong & i and em.

I had thought that and describe how something should look, whereas and describe the meaning of something. means "this text should be thicker and darker than it normally would be", indicates "this text has gravitas... interpret that however you want". In other words, visual vs. semantic.

Re: A Blog Post with Every HTML Element

#16
post #12

This comes up briefly but I do still find it ridiculous that there's no simple standard CSS declaration to hide something from visible display but keep it for screenreaders. Everything I've seen still does clip, or positions the content off the side of the page, or something like that. How is this not just an alternative "display" value, or an additional property? There's been a "speak" property floating around in on…

Why should it be a part of CSS, that handles visual representation, and not part of HTML, which handles data, structure, and semantics? I wonder if a whitespace with a right aria-label could fit the bill.

CSS's display: none and visibility: hidden already affect what the screenreaders can "see." So it's already involved.

Re: A Blog Post with Every HTML Element

#17
post #11

This comes up briefly but I do still find it ridiculous that there's no simple standard CSS declaration to hide something from visible display but keep it for screenreaders. Everything I've seen still does clip, or positions the content off the side of the page, or something like that. How is this not just an alternative "display" value, or an additional property? There's been a "speak" property floating around in on…

> no simple standard CSS declaration to hide something from visible display but keep it for screenreaders ARIA attributes allow for that. https://developer.mozilla.org/en-US/docs/Web/Accessibility/A... Example code. https://stackoverflow.com/questions/26032089/in-html-how-can...

aria-label/labelledby is not always a workable solution. Sometimes you really need the text to be sitting there on the page as text for things to work right.

Note that the very SO thread you linked to goes immediately to doing position/clipping tricks right after mentioning aria-label.

Re: A Blog Post with Every HTML Element

#18
post #2

How fortunate, I was looking for something like this today for a side project. HTML can do so much already, I'd rather lean into it than use one of the bloated frameworks/libraries out there. Really helpful to see it all in one place!

Have you tried htmx?

Yes! I just used it last week to create a quick gallery website. It's been a lot of fun playing around with it. Like the other poster said though I wasn't able to get it to do everything I wanted in frontend so used a bit of vanilla javascript as well.

Re: A Blog Post with Every HTML Element

#19
post #7

> Some of deprecated elements won’t render without some extra work, for example and are designed to be used instead of a , for I guess some kind of collage web page made up of other pages. The author is too young to remember frames, huh? :) I'd just link the Wikipedia article ( https://en.wikipedia.org/wiki/Frame_(World_Wide_Web) ), but I feel like it doesn't explain it very well. So, to briefly explain -- in the ear…

One usage of frames I recall was for sites that were meant to act as an index of other sites, where there’d be a sidebar on the left with links to various sites that opened on the right. I think this was actually a pretty good use case for frames, especially back before browser tabs existed. It was nicer to run through a list of links in one window with frames than to jump back and forth through history or juggle mul…

When I was young and still lesrning the basics I used it as a table of content for some long webpages that you could use to quickly jump from one anchor to another, or as a sitemap.

Re: A Blog Post with Every HTML Element

#20
post #7

> Some of deprecated elements won’t render without some extra work, for example and are designed to be used instead of a , for I guess some kind of collage web page made up of other pages. The author is too young to remember frames, huh? :) I'd just link the Wikipedia article ( https://en.wikipedia.org/wiki/Frame_(World_Wide_Web) ), but I feel like it doesn't explain it very well. So, to briefly explain -- in the ear…

One usage of frames I recall was for sites that were meant to act as an index of other sites, where there’d be a sidebar on the left with links to various sites that opened on the right. I think this was actually a pretty good use case for frames, especially back before browser tabs existed. It was nicer to run through a list of links in one window with frames than to jump back and forth through history or juggle mul…

I remember the arms race between these kind of framing sites (often increasingly scammy) and sites that did not want to be framed and had various anti-framing scripts.
Post reply on HN