Siteimprove flags accessibility issue related to MathJax

27 views
Skip to first unread message

Michael Boudreau

unread,
Jun 5, 2024, 11:55:48 AMJun 5
to MathJax Users
Hello,

Our web site is monitored for accessibility issues by Siteimprove. Last month it began flagging pages on our site for the issue "Field input error is not announced in full", which it describes as follows:

"Field inputs that are marked as aria-live='assertive' cause a screen reader to interrupt the user when an error occurs. Marking a field input as aria-atomic means that the screen reader announces the complete error message each time it occurs."

The HTML it identified as problematic is two empty <div> elements just before the </body> end tag:

<div class="MJX_LiveRegion" aria-live="assertive" style="background-color: white;"><div></div></div>
<div class="MJX_LiveRegion" aria-live="assertive" style="background-color: white;"><div></div></div>

These appear to be added to the page's Document Object Model by MathJax. Despite the fact that the divs are not part of a form and would be ignored by any screen reader, Siteimprove docks us a few points, which unfortunately is noted by the higher-ups.

Siteimprove's recommendation is that any element with aria-live="assertive" should also have aria-atomic="true". Is the aria-live attribute crucial for MathJax's functioning, or can it be removed? If not, can the aria-atomic attribute be added? Has this issue come up for anyone else?

--Michael Boudreau
The University of Chicago Press

Davide Cervone

unread,
Jun 6, 2024, 3:15:48 PMJun 6
to mathja...@googlegroups.com
Michael:

Which version of MathJax are you using?  

Yes, the aria-live attribute is important, and should not be removed.  We can probably give you a patch that will add the aria-atomic attribute you are looking for, but how that works will depend on the version of MathJax you are using.

The MJX_LiveRegion divs are used when the user activates the expression explorer, which is part of MathJax's accessibility tools to allow a user to ask through an expression and have it read in smaller units.  Note that the latest beta version of v4 has changed the mechanism used for making these announcements and no longer used aria-live regions.  So when the official v4 is released, there will not be live regions any longer.

Davide


--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/24d69041-61e9-4a26-a964-3e746453e86an%40googlegroups.com.

Michael Boudreau

unread,
Jun 11, 2024, 4:37:09 PMJun 11
to MathJax Users
Thanks for this helpful reply, Davide.

It turns out our site is using MathJax version 4.0.0-beta.4. (Why our vendor is using beta software on a production site is a question I'll have to ask the vendor.) If the official production version of MathJax 4.0 won't have these divs, presumably Siteimprove won't have anything to complain about once our site's version of MathJax is upgraded.

In the meantime, Siteimprove gave me a way to flag all such elements, using a CSS selector, as false positives, which should recover the lost accessibility points, so a patch won't be necessary.

--Michael Boudreau
The University of Chicago Press

Davide Cervone

unread,
Jun 11, 2024, 4:45:51 PMJun 11
to mathja...@googlegroups.com
I suspect your vendor is using the beta version because it includes a number of important new features that people have been waiting for (automatic line breaking and support for more fonts with larger glyph coverage are the main two points).  The updated ARIA handling is in beta.6 (beta.5 didn't get published due to a packaging error).  But the beta.6 version also has a significant performance issue due to those changes that we are in the process of fixing for beta.7, so that may be why they are still at beta.4.

In any case, I'm glad you have been able to resolve the issue for you for now.

Davide


Reply all
Reply to author
Forward
0 new messages