-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JAWS not reading MathML present in HTML form element labels #526
Comments
MathML is no longer supported by Chrome and Edge. I.e. in the current versions of the browser the problem does not occur anymore - the label text is output completely, but not correctly (only as text, not as mathematical formula). In Firefox the problem occurs, but it is not a JAWS bug, but a Firefox bug, because the content of the math element is not transmitted to the Accessibility API as part of the label. Therefore, the problem also occurs with other screen readers such as NVDA. To be quite precise: it is actually an Accname specification problem, because the math element only has a label if it is explicitly labeled. Text content does not count as a label. See w3c/accname#120 |
The problem occurs with all form field types. However, it is particularly problematic with radio buttons and checkboxes, because only the label is output with these form element. With all other form field types (e.g. input fields), the label is output separately when reading linearly with the arrow keys and is thus fully perceptible at least with the virtual cursor (even if only as text and not as a label). |
I thought JAWS supported reading MathML. Regardless of if Chrome or Edge supports MathML natively, MathML rendering layers like MathJax and KaTeX expose the MathML to AT to be read. For example, the default behavior of MathJax v3 is to let JAWS parse and read the MathML - so this would be in any web browser, not just Firefox. JAWS reads and explores math in Chrome just fine in many cases .... so JAWS does support reading MathML in Chrome. |
My test found: JAWS does not support MathML, but only the code generated by MathJax. This then works in Firefox and Chrome/Edge. When I test the above example with MathJax, I find that in Chrome/Edge the mathematical content is output as plain text and not as a mathematical formula, although the formula itself is output correctly (if it is not part of the label). The difference with Firefox would be that there the MathJax content is not output at all if it is part of the label |
When you view the HTML page the submitter provided in Chrome, doesn't the math under the first level 2 heading read correctly? That page does not use MathJax or any other math rendering JavaScript layer. So.... JAWS does read MathML from web pages, right? |
Peter Krautzberger (one of the MathJax creators) confirmed to me that the default behavior of MathJax is to:
|
I have tested it again. Unfortunately, I got different test results that are not consistent. In my last test JAWS with Chrome also output Math correctly as formula without MathJax. In the test before that, it made a difference if the xmlns attribute was on the math element or not - very strange. Anyway. The current test results are:
Imagine you have an input field whose label consists of a heading, a graphic, and a list. Even in this case, a screen reader will only ever output the text content of the heading, graphic (alternative text), and list, but never the structure and role of the elements. The same is true for math elements. |
In many cases, the JAWS software augments the accessibility API with information from the DOM. For example, an empty link that lacks any other potential label (ARIA, title attribute, etc.) will be announced by some portion of the URL found in the link's href attribute. I've assumed this non-standards behavior is a feature of JAWS where it is attempting to at least provide some identifiable moniker as a last resort to help the user. For example, JAWS still provides a "name" of "long/urlAndFileName" for the link in this code : If FreedomScientific wanted to provide a consistent level of support for reading mathematical content, it seems a similar model of reaching past the accessibility API could be employed to scan the DOM for the presence of math and augment the accessible name with speech text representation of the MathML content. This might be the only way such an issue would get resolved as this issue Is there a place to make a JAWS feature request? I |
@brichwin You are right: JAWS can access the DOM if it wants to. So unlabeled form fields are also output with the text before or after them. But I think the problem here is that JAWS only does this when a link or form field is unlabeled, i.e. as a repair mechanism for incorrect source code. But if JAWS gets a correct name via the Accessbility API, it doesn't bother to parse the DOM. And here that is the case: both Firefox and Chrome submit a name (albeit a different one) via the API, so JAWS trusts that it is correct. |
I think that ticket should just stay open, then Freedom Scientific can check if they want to improve something in their product. |
@brichwin @JAWS-test I had a look at this and think the issue is that the Anyway, a work around I found:
When the user arrows into the |
@stevefaulkner Thanks for taking a look at it! However, I don't think it's a valid solution as it runs against expected behavior. The expected behavior being that traditionally when content is related to a radio button or checkbox, it appears both visually and in the DOM immediately after the radio button or checkbox - not before it. When a non-visual user reads though the solution, they could very easily assume the math goes with the prior radio button (square root of 2 i math content goes with Option 1). The non-visual user w/o any usable vision will not have benefit of the CSS produced visual appearance. The expectation that moderately skilled screen-reader users would successfully take on the extended cognitive burden of having to figure out this non-traditional approach in the context of taking a high stakes exam seems unreasonable to me. Since the math content in the offered solution reads out immediately after the prior button's label and before the radio button it is meant to be paired with, a non-visual student could easily say they were mislead into selecting the wrong answer and both the screen-reading experience and the code would justify their claim. |
@brichwin yeah, understood, unfortunately there is not a better solution available currently, I don't think it practical currently to include MathML as part of a |
The only solution we could come up with is this: When needing answer options with MathML, provide all of the answer options in the question area as a list. with labels that correspond to the labels in the answer selection radio buttons or checkboxes. This allows for the math in the answer options to be explorable and read out correctly. For example (pretend MathJax is rendering the LaTeX as MathML):
See it on codepen: https://codepen.io/brichwin/pen/VwpdyjY |
Summary
Some HTML form elements may be frequently used in conjunction with math. One example is multiple-choice math questions with answer options that are mathematical and presented as radio buttons. In such cases, the mathematical answer options are naturally placed in the button label. However, JAWS does not read MathML within labels, which leaves the user with only the button itself being announced. This problem also exists when MathJax is used, but since MathJax defaults to passing on MathML to JAWS, it is expected that issue will resolve when solving this MathML issue.
Expected result
When JAWS announces a radio button with math in the label, one would expect to hear: “Option 1 square root of 1 i math content radio button not checked 1 of 2”
Actual result
When reading a radio button with math in the label, JAWS instead announces: “Option 1 radio button not checked 1 of 2” completely omitting the MathML.
Example
https://indiana.sharepoint.com/:u:/s/O365-UITSATAC/EZt6aBlfITFJjon__TEq6DkBJoz58Y4HRSuxq0dLogSyug?e=Jg1r9O
Additional Information
JAWS version and build number
JAWS Version 2021.2103.174 ILM
Operating System and version
Windows 10 Enterprise x64 - ConfigMgr - v1.0 - 5.21.2018
Browser and version:
The text was updated successfully, but these errors were encountered: