Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is for the visually impaired! Screen readers will announce the hidden element


Can screen readers not figure out that a 1px x 1px element with a clip-path: inset(0px 0px 99.9% 99.9%) is invisible?


Screen readers are a lot dumber than you'd expect... And now web designers have come to rely on this dumb-ness, so making them smarter breaks stuff.


The trouble is, I think, that typefaces vary so much that some could appear to have a strike through when they don't.

Or take for example the number 0 which sometimes has a fairly horizontal slash through it. Do you program the screen reader to check if the struck letter is a 0, and if so, consider it not to be struck? But... What if it actually is, and that typeface doesn't have a slashed 0?

Do you only check perfectly horizontal strikes? How thick? At which height in the type? How much overhead is it to parse all of this? etc.

This also requires rendering the document and inspecting the image with object detection, I would think? Someone correct me if I'm wrong, I'm only trying to imagine potential problems.


The issue is not with detecting the strike through. The issue is that the CSS of the hidden "not" element obviously makes the element invisible, but a screen reader still reads it.

Obviously, Apple is abusing that fact here in order to insert elements that only screen readers would see. Definitely feels like a hack.


I understand what's happening (I use this approach myself). I'm only wondering about if the strike-through recognition idea makes sense.


There is a text-decoration: line-through csv styling available, which I would hope a screen reader would convey properly. Apple isn't using that here though, for whatever reason.

An AI could probably get pretty good at detecting and interpreting stuff like the ::after as a strikethrough. The general problem of extracting semantics from a hacked up html / css / js web page feels like it would require a human level AGI. There are a ton of ways to make text appear with a line through it, and in some cases it may not even have been intended as a strikethrough.


screen readers don't do OCR.


That's kind of my point - I don't understand how you could go about identifying words on screen with a strike-through in the way they described.


Depends on how you implement the strikethrough; if you use the HTML tag - the screen reader will have zero trouble.

Although with all the vDOM and JavaScript crap these days, web is quite inaccessible compared to most native apps.


Do they not indicate strike through already in another way?




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: