Hacker News new | ask | show | jobs
by RogerL 1087 days ago
But what is the answer? What should I do differently? I get don't use images, but then what? I can't imagine all screen readers have the same capabilities, or that there is a base common ability, so what should we do?

Googling says MathML is the answer (e.g. https://www.washington.edu/doit/how-do-i-create-online-math-... this site uses MathML and your reader isn't handling it. So now what? (alt-tags? something else?)

3 comments

When I view source (not the DOM) I can see that all of your math has aria-hidden="true". That seems to carry over into the parsed/generated math markup: run `document.body.innerHTML += '<style>[aria-hidden="true"]{ outline: 3px solid red; }</style>'` to see all the hidden-from-screenreader things highlighted. That may be enough.

For content that really cannot be written in a way that screen readers can handle, there is always the idea of Screen Reader Only content. It's a hassle, but let's jump in and give it a shot

For instance for the first math thing you can have

    <style>
        .sr-only {
            position:absolute;
            left:-10000px;
            top:auto;
            width:1px;
            height:1px;
            overflow:hidden;
        }
    </style>
    <p class="sr-only" id="definition-of-reduced-derivative">
        The reduced derivative with respect to x is denoted crossed-d over dx of the function f(x). It is equivalent to the the derivative with respect to x (denoted d over dx) of the function f(x) all over 2 pi. 
    </p>
Then you make sure that the element that wraps up your first equation has aria-describedby="definition-of-reduced-derivative" so that the SR reads out that content. I think you may need to not have "aria-hidden" on that math wrapper, but I'm not sure.

This is not an authoritative answer; I'm just some asshole who writes front-end code a lot. More of a Cunningham's Law situation that anything really. You don't want to end up creating one experience for sighted users and completely different one for screen-reader and refreshable-braille-display users. But this can maybe get the wheels turning for how to address it? Also again maybe TOTALLY unnecessary once you un-hide the math markup.

How does this interact with Find? Select text?
solid point: it kind of wrecks them. I just checked in a codepen. Copying the text around the hidden paragraph will also copy the hidden paragraph. Maybe that's a feature? Searching for the content will also show that it's on the page but that you cannot meaningfully get to it, which kind of stinks.

These two issues get solved by aria-description where the description exists entirely in an attribute on the element rather than as a reference to another node in the DOM tree. But it's still in the draft for ARIA 1.3 so it's not fully adopted yet.

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

CanIUse info (tl;dr only in chromesque browsers) in the property info https://developer.mozilla.org/en-US/docs/Web/API/Element/ari...

One option would be to do testing with screen-readers and then find out if the content works, and if not find out why.
I think most people are fine with the idea that some of the costs (monetary and otherwise) arising from disabilities should be transferred from the people suffering from them to society at large. But I don't think it's reasonable for producers and users of broken screen readers to expect everyone (including authors of private blogs posts) bending over backwards to accommodate them, nor is it a remotely efficient use of societal resources. It also creates completely perverse incentives.
If there is a bug in the screen reader then that's on the vendor.

However the overwhelming number of cases where a website is unusable with a screen reader are due to lack of proper semantic tagging, like alt text and so on. The last thing a screenreader user wants to hear on a site is "button," "button," "button..." There's certainly room for tooling to help though. I definitely think it sucks that many accessibility linters are nonfree and thus will never be used by site devs who aren't worth suing.

It's worth remembering that accessibility helps everyone, not just the disabled. In fact one of the more popular arguments against accessibility is that it allows non-disabled persons to do more than intended.

So while there's a good argument to be made for being charitable to those with a frankly really lousy condition, if you just want to be self-centered you still benefit from properly tagged data.

Did you even bother looking at the website source before writing this?
What part of if there’s a bug in the screen reader it’s on the vendor did you fail to understand?
It depends on what public you care about. If readability did general public is a concern, just get rid of all these symbols and go with plain prose text, possibly using images as preferred illustrations over any ideographic way to encode ideas.
You can't discuss math while getting rid of the math symbols. That's not a reasonable proposal.

Math on the web is broken, the the affected people should be up complaining about that. This site did the most accessible thing possible; the fact that every tool broke here, just like they do for every other method is not really the author's fault.

It’s not entirely impossible; mathematicians did it for thousands of years (just read Newton’s Principia). It does use very specific language to do so, and some of the language might not exist for some advanced mathematical concepts, but I think that this whole article could be written that way.
> mathematicians did it for thousands of years (just read Newton’s Principia)

What mathematicians did for thousands of years arose in a culture of oral proofs supplemented by prepared diagrams: Euclid's proofs were meant to be recited aloud in front of an audience while pointing at an image labeled only with single letters/numerals – not read in a book. The society was substantially illiterate, there was no access to paper or good pens, algebra had not yet been invented, and all arithmetic was done mentally or using fingers or physical tokens.

Compared to mathematical notation, natural language expressions are often incredibly large and cumbersome, can make following the argument extremely difficult, and make many kinds of symbolic manipulations all but impossible.

Providing a visual way to interpret and manipulate mathematical expressions was a revolution in mathematics without which most modern mathematics would never have appeared. Eliminating that is comparable to writing computer programs via punched cards because "that's how they used to do it".

Yeah, let's talk about the difference in accessibility between the text on this site and Newton's Principia...
I think parent is referring here to the fact that math used to be written without symbols (other than numbers) up to the 1300s according to Wikipedia: https://en.wikipedia.org/wiki/History_of_mathematical_notati... (very interesting article!) However, I would say that there is a reason why notation tends towards terse symbols: it's much more efficient and unambiguous.
Even Newton's Principia has symbols, they're just different. His notation used dots and lines & boxes in various positions.[1]

[1] https://en.wikipedia.org/wiki/Notation_for_differentiation#N...

Maybe ctoth or some other user of screen reader might have a look at https://en.wikisource.org/wiki/The_Mathematical_Principles_o... and tell us how it goes.
> You can't discuss math while getting rid of the math symbols. That's not a reasonable proposal.

If we assert that some topic can’t be discussed with plain prose, then the only logical conclusion is that you can’t discuss the topic at all.

> Math on the web is broken, the the affected people should be up complaining about that.

There is really two different topic there.

One is, how can screen readers deal appropriately with symbolic notations — be it astrological esoteric formula or mathematical abstruse formula.

An other one is how you chose to express ideas. Using symbols only is always possible, whatever the topic. Using prose only is always possible. Using multiple representations is also always possible, including audio record, alphabetical text, ideograms, pictures, video.

Note that I didn’t blame the author for any fault here. I just pointed out that, if one take as a goal to be the most accessible as possible to general public, using academic symbols is not the way to go. It doesn’t mean that people with some matching academic curricula might not prefer to have a document full of esoteric symbols, be it for real actual communication advantages or mere bigotry and vulgar elitism.

We all know here, I guess, that anything written with this kind of symbols can be just as well and without any ambiguity transcribed into a programming language which use exclusively mundane words or turned into a series of two signs that no one can grasp instantly.

That conversation make me think about comments in https://news.ycombinator.com/item?id=36433212

> If we assert that some topic can’t be discussed with plain prose, then the only logical conclusion is that you can’t discuss the topic at all.

Please bear in mind that mathematical notation is a language, and that mathematical formulas are perfectly valid plain prose in that language.

I imagine that some screen readers will fail gracelessly when faced with Chinese script or Hindu as well. Especially if they're not unicode compliant.

But once you hit that threshold you are simply in a battle of dueling accessibility concerns. Not everyone is sighted, but neither does everyone rely on English as a primary language.

Nor should they as the English language was not designed to convey all concepts accurately. It excels mostly in conveying concepts germane to anglophone cultures. And three guesses what concepts are not popularly relevant to your standard anglophone? That's right.. calculus and theoretical physics.

That's not to bash on English as a language. It really is a flexible beast with a far reaching vocabulary. But there literally exists no language that is ideal for encapsulating every single idea under the sun. One must have a way to support many of the most diverse ones at the same time. And modern mathematical notation belongs on that short list along with English.

>Please bear in mind that mathematical notation is a language, and that mathematical formulas are perfectly valid plain prose in that language.

In that sense its more a DSL than a generalist language. And anything you can express in a DSL, you can also express it with a more generalist language. Most likely the DSL will provide a far more compact way to communicate what it allows to express, but that compactness doesn’t come for free: it takes time to compress and decompress and you have to also communicate the DSL specification in some preexisting medium.

On my side, I suppose "discuss" to mean we can talk on the topic face to face with spontaneous expressions means like oral expression and listening comprehension, or sign language. I don’t mean that there is no other mean to discuss, but when we can’t transpose the topic in such a medium, we are probably beyond the realm of discussion. For example when we make love, there is more happening than what can either hope to realize through mere talk.

Once again, I’m not again DSLs and so on. I just mean that there are not the proper tools for maximizing accessibility.

Why is "plain prose" so logically the litmus test for what can be discussed? It certainly wasn't designed around the idea it should cover every possible concept, or do so remotely efficiently either, so the repeated assertion it logically is the only way to know if a concept can be discussed is a bit hard to follow. It does cover most concepts though, and conveniently.
I don't think it's really viable to just stop posting equations altogether. Yeah it's more accessible, but it would also completely cripple any sort of discussion between mathematicians, physicists, etc.

Equations and mathematical notation aren't simple illustrations. They're in many ways more important than the stuff around them.