[BlindRUG] Accessible maths in R markdown

Godfrey, Jonathan A.J.Godfrey at massey.ac.nz
Wed Aug 11 08:18:16 UTC 2021


Hi all,

Marcus asked about accessible maths in R markdown.

I use R markdown for practically every document I write at present. I haven't initiated a LaTeX or MS Word document in the last five years, although I do have to engage with both because that is what is used by others.

I do a lot with bookdown now too, and in all of this work, I've got very few problems with reading anything I've created with the use of single or double $ marks to get equations into my work.

I was informed by one of my colleagues that what I was creating was not showing up for my audience. This was extremely frustrating as the content was displaying just fine on my own laptop in lectures and on my personal desktop machine. We changed the source for the version of mathjax  to use and all came right. It was never wrong for me with respect to a screen reader, and TBH, I'm still bemused by the problem.


There are some symbols that do not get read by mathjax and screen readers. The standard epsilon symbol is an example. The variant \varepsilon gets read as "epsilon" and this is what I use in my work as a consequence. None of my colleagues have complained about my preference; the Oxford educated professor used \varepsilon and he has absolutely no good reason for doing so aside from personal preference.

Equations in bookdown documents get put into a table of some sort in HTML so that the equation number gets put out to the side. It is extremely good looking to the sighted audience, but JAWS does not see it as math content and let mathjax do its work for me. I do tend to read the raw Rmd file if I am referring to anything, but it is a frustration nonetheless. See equations in https://R-Resources.massey.ac.nz/161331/ELMER/ as examples of JAWS failing but note that not all equations are numbered; the unnumbered ones are those that JAWS can read.

I find that JAWS takes forever to create its virtual document if there is too much mathematical stuff to process, and at times all I get is "x" in the paragraph being read unless I move the cursor right on top of the content. I also detest hearing "math content" after every little trivial thing that an author put in single dollar marks. My solution for both of these issues is to use italics for so many items that do not actually need to be put in a truly mathematical expression. This matters a lot to me when delivering classes and I want to cut the audio clutter from JAWS down to a minimum. If I get away with creating an expression without a backslash then I try to do it. It does make things much more readable even if I am knowingly abusing the minor alterations in font between math and italics, not to mention the semantics of correctly labelling elements of my work.

Mathematical stuff in bullet point lists seem to behave badly at times too. This is when JAWS really struggles to process the information.

On the whole, the issues I'm reporting on seem to relate to how the screen reader works, not how R markdown works. Forcing Rmd files to use mathjax was necessary five years ago; today it is the default. I presented on this topic at UseR2016 in San Francisco. I wouldn't need to spend the same amount of energy in 2021 to discover the best options, but in 2016, the hours of testing was worth my effort.

My experimentation with NVDA is fairly limited. I am a competent NVDA user, not an expert. I've delivered lectures using NVDA in emergency situations without too much pain and suffering, but (touch wood) this hasn't been necessary for a few years. My main use for NVDA remains as the tool to get me out of a JAWS hang up, almost invariably caused by JAWS failing when I'm using  a Microsoft product. <sigh>

I am interested in knowing if there are other issues people are experiencing with mathematical content in R markdown files. I'm sure we can find out whether the problems are related to the screen readers, the flaws with mathjax, or the R markdown.

Jonathan


-----Original Message-----
From: BlindRUG <blindrug-bounces at nfbnet.org> On Behalf Of Marcus Low via BlindRUG
Sent: Wednesday, 11 August 2021 12:39 AM
To: blindrug at nfbnet.org
Cc: Marcus Low <low.marcus at gmail.com>
Subject: Re: [BlindRUG] BlindRUG Digest, Vol 58, Issue 2

Dear Robin and Liz

Thank you for an interesting discussion.

I also find the poor accessibility of graphs a constant frustration. A related problem is the poor accessibility of mathematics, or any kind of equation really, in e-books. Here there is even less excuse for people not to make content accessible. It is such a relief to encounter MathML-formatted math online that can be read in a sensible way with a screen reader.

Which brings me to a question, is anyone aware of a guide to producing accessible mathematics using RMarkdown?

Regarding accessibility of graphs/figures, I'd say there are four approaches:
1.	Getting authors (like the BBC) to write better alt-text. This is
probably best done by developing some standards/guidelines for what constitutes good description and then advocating for the adoption of those standards/guidelines. It would be a great project for the World Blind Union, RNIB, or one of those organisations to take up.
2.	Getting authors to use more accessible formats/standards, to the
extent that they exist. I am sure others on the list no more about this than me.

3.	Crowd-sourcing image description, which I think has excellent
potential. See e.g.
https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.bookshare.org%2Fcms%2Fabout%2Fnews%2Fpress-releases%2Fbenetech-releases-image-description-tool-improve-accessibility-graphical-content-students-print&data=04%7C01%7CA.J.Godfrey%40massey.ac.nz%7C6248945374c0426d542108d95c0152f4%7C388728e1bbd0437898dcf8682e644300%7C1%7C0%7C637641983053075669%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=O8k5Ii0u2GU3qpoEd4zHAGT%2Bt5zdWB%2FQxJ6aoHmU5oE%3D&reserved=0
4.	Using machine learning to generate descriptions, which could
potentially be done in conjunction with crowd-sourcing efforts. It seems to me that step one for any ML solution would be to categorise graphs as say pie charts, histograms, or whatever - and then once classified, to extract some specific information from the image using a second ML model specifically trained to produce descriptions for that type of graph. Again, I'm not an expert on this, but I think there is some fascinating and very useful work to be done here for someone with the energy and time.

I'm happy to keep discussing these issues off-list with those who are interested if people feel it is clogging the list with non-R issues.

Thanks
Marcus


On 8/10/21, blindrug-request at nfbnet.org <blindrug-request at nfbnet.org> wrote:
> Send BlindRUG mailing list submissions to
> 	blindrug at nfbnet.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	
> https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnfbne
> t.org%2Fmailman%2Flistinfo%2Fblindrug_nfbnet.org&data=04%7C01%7CA.
> J.Godfrey%40massey.ac.nz%7C6248945374c0426d542108d95c0152f4%7C388728e1
> bbd0437898dcf8682e644300%7C1%7C0%7C637641983053075669%7CUnknown%7CTWFp
> bGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn
> 0%3D%7C1000&sdata=LKqMm%2FEX3VdfprcMhplj5HvGB%2BuBQSG3P0bGibjKiuk%
> 3D&reserved=0 or, via email, send a message with subject or body 
> 'help' to
> 	blindrug-request at nfbnet.org
>
> You can reach the person managing the list at
> 	blindrug-owner at nfbnet.org
>
> When replying, please edit your Subject line so it is more specific 
> than "Re: Contents of BlindRUG digest..."
>


--
Spotlight Editor
Mobile: +27 (0) 82 96 28 309
E-mail: low.marcus at gmail.com
Twitter: @MarcusLowX @SpotlightNSP

_______________________________________________
BlindRUG mailing list
BlindRUG at nfbnet.org
https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnfbnet.org%2Fmailman%2Flistinfo%2Fblindrug_nfbnet.org&data=04%7C01%7CA.J.Godfrey%40massey.ac.nz%7C6248945374c0426d542108d95c0152f4%7C388728e1bbd0437898dcf8682e644300%7C1%7C0%7C637641983053075669%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=LKqMm%2FEX3VdfprcMhplj5HvGB%2BuBQSG3P0bGibjKiuk%3D&reserved=0
To unsubscribe, change your list options or get your account info for BlindRUG:
https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnfbnet.org%2Fmailman%2Foptions%2Fblindrug_nfbnet.org%2Fa.j.godfrey%2540massey.ac.nz&data=04%7C01%7CA.J.Godfrey%40massey.ac.nz%7C6248945374c0426d542108d95c0152f4%7C388728e1bbd0437898dcf8682e644300%7C1%7C0%7C637641983053075669%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2BQDqp3r4wAGOtSbWtfGFCh7Bj9busrkQyuy3FMyiH8c%3D&reserved=0
The list archive can be viewed at:
https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.nfbnet.org%2Fpipermail%2Fblindrug_nfbnet.org&data=04%7C01%7CA.J.Godfrey%40massey.ac.nz%7C6248945374c0426d542108d95c0152f4%7C388728e1bbd0437898dcf8682e644300%7C1%7C0%7C637641983053075669%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=mcWaQv%2F7W%2FooDBkHZfEJ8KkcN7wOqwKmxftnKbJd%2BMk%3D&reserved=0
More information and useful links about using R as a blind person can be obtained at:
http://R-Resources.massey.ac.nz

Look for help using R commands by reading the accessible e-book "Let's Use R Now" compiled by Jonathan Godfrey at:
http://R-Resources.massey.ac.nz/lurn/front.html



More information about the BlindRUG mailing list