Hacker News

Favorites Setup
Comment by dspillett | original | HTML Can Do That
[−]dspillett · 2026-08-20 Thu 16:48 UTC · link
It won't be an intended use case, but it might be a convenient place to put poisoned content for the “benefit” of scrapers…

Though humans will accidentally find it too, so using a details tag with appropriate summary as a warning would be more friendly than just hidden content. It'll still get opened, but the user at least has a way of closing it again afterwards.

Also before using it I'd want to check what old UAs including accessibility tools tend to do when they hit a value that they don't recognise for the hidden="" attribute - would what they don't recognise as a valid value result in defaulting to the content being hidden or visible/read/other?

[−]account42 · 2026-08-21 Fri 12:26 UTC · link
What would be the advantage of using this attribute compared to the various ways to permanently hide elements?
[−]dspillett · 2026-08-21 Fri 14:35 UTC · link
> compared to the various ways to permanently hide elements?

That it might look more like it is intended for human consumption where the others might get their content filtered out due to looking like an obvious trap? More so in the case of the detail tag. Of course they might not be filtering on that sort of thing at all, after all there are many cases of content for humans being hidden that way until activated by script and they won't want to be filtering those out, so it doesn't actually matter and the key will be not showing the otherwise pointless content to human viewers.