-
Notifications
You must be signed in to change notification settings - Fork 125
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
ARIA 1.1: Remove children-presentational true from math role #425
Comments
If ARIA 1.2 is still limited to HTML Role Parity, this issue is not in scope. |
This issue is more like an editorial correction than an actual change. If browsers have implemented this, they have made the math role pretty useless. The other possibility is that I don't yet understand the purpose of the math role. |
The ARIA The ARIA implementation is basically a subclass of "image" and IMO, should remain as-is for ARIA 1.2. Changing it to make children non-presentational could break some of the LaTeX test cases. |
@cookiecrook wrote:
I agree. However, this issue is not to provide complete support for math. It is to remove children presentational true.
No, it is a subclass of section. My understanding has been that the math role is more like a region or figure that is designated as containing math content, which could include one or more images as well as widgets or structures. However, this is not possible if children presentational is true. The definition of the math role and its position in the ontology do not jive with children presentational.
Would love to learn more about these test cases and, if you can point to them, actual implementations where the math role is providing benefit. |
@mcking65 wrote:
Sorry for not being more clear. I intended to say that the implementations of the @takenspc wrote
IMO, this is an error in the mapping. @stevefaulkner? The Perhaps the best argument against changing it is that most of the math role description could be summed up as: "This role is intended to support legacy images of math. Use MathML instead of this. It's way better." I believe that this should be resolved by updating the HTML-AAM to divest |
The following example gives a human-readable plain text aria-label (not TeX but nearly so), and the contents are basically an ASCII layout of Math that would not make sense linearized. <pre role="math" aria-label="x=⟮−b±√⟮b²−4ac⟯⟯÷2a">
−b±√⟮b²−4ac⟯
x = -------------
2a
</pre>
The math role has a very limited utility, it's effectively an image with "math" as the role description instead of "image." MathML on the other hand, provides a lot of utility. IIRC, we've supported it in WebKit and VoiceOver for the last 4 or 5 versions of iOS and macOS. Users can navigate to and explore each individual part of equations, and VoiceOver converts the formula to Nemeth on connected braille displays. |
Following some encouragement from @stevefaulkner:
This seems a rather extreme exaggeration.
So for all intents and purposes, developers should consider MathML deprecated for the web. And they do -- all public crawler data indicates that MathML is used exclusively with JavaScript rendering solutions; this includes every significant STEM publisher out there and even Wikipedia (though it now could deliver MathML). To end on a positive note. The still relatively new MathOnTheWeb Community Group focuses on pragmatic solutions hopes to provide feedback on potential incremental improvements to standards. There's already agreement on our a11y task force that a modified math role could greatly help real world solutions for math rendering (using CSS and SVG) when it comes to enabling better and more consistent representations of on the accessibility tree. Certainly, not removing all children from the accessibility tree is a must. We are currently gathering input from the CG (and beyond) and plan to connect with the ARIA WG once we have useful list of ideas. |
I appreciate the detailed reply, but I think it paints a bleaker picture of MathML than is fair. Especially this bit. @pkra wrote:
Apple engineers did a lot of work to support MathML in iBooks and VoiceOver, as well as the API mappings in WebKit. There's also an entirely different parser and renderer in the iBooks Author context. There are some third party products used to help generate the source MathML or LaTeX for iBA. AFAIK, Apple engineers created the only live conversion implementation of any open math standards (LaTeX and MathML) to Nemeth braille. (Microsoft's Word implementation being a propriety format.) As far as I know, it's also the only accessible solution that doesn't take the "self-voicing web application" approach. Please correct me if I'm wrong.
Backing up to my point about the current What do you think about this counter?
At a high level, I'd ask: Are you recommending using legacy images of math instead of the only Math solution with reasonable level of accessibility support? Regardless of accessibility considerations, even a polyfilled implementation in Chrome strikes me as a more robust solution than raster images. |
To address the more important part of #425 (comment):
Speaking for myself, I think both points would open up a path for improvements that help developers and users in the real world.
I'm guessing with "only Math solution with reasonable level of accessibility" you are referring to MathML. Given the lack of support for it in browsers or AT, this feels like a trick question (or perhaps like setting the bar really low). Raster images are clearly not a reasonable solution. HTML (+CSS) and SVG markup has been the best choice for visual rendering of mathematics for years now (essentially can be delivered down to IE8) and visual rendering is a major accessibility concern after all. These formats also provide a good base for providing a better presentation on the accessibility tree, starting with flat, top-level labels and improving from there. For example, my own focus is on deeply nested labels that allow quite decent exploration on some AT (and a role=math could help AT provide a better exploration experience). Enriched HTML and SVG can easily be created from tools that enrich MathML but do not limit developers to MathML (e.g., work at Desmos or Khan Academy). Regarding the other parts of #425 (comment).
It is what it is. In 18 years, MathML has tried and failed on the web twice. The WG is gone and the spec dead in the water (i.e., no way to improve it even if it wasn't as problematic as it is). Better solutions have been developed, in part based on MathML's experience but also using completely different approaches. Those solutions are rely on successful and continuously improving web standards and benefit from increasing stable browser implementations (and again starting with IE8 here).
I don't want to denigrate the work you and others at Apple are doing. For me, the lack of quality says more about MathML than about Apple's engineers -- it's garbage in, garbage out. Still, bugzilla does not send a good message. FWIW, I have the impression that MathPlayer's really excellent heuristics have warped the perception in the a11y community regarding MathML's ability to provide accessible rendering. It's if we people raster images by recent improvements in machine learning generated image descriptions; those do not make raster images an accessible format either.
If iBA is still using the Pages engine, I don't see how it applies to this context. Though, since you bring it up, the fact that iBA does not convert TeX to MathML but to SVG using BlahTeX seems to indicate a lack of confidence in its MathML rendering.
I I don't know what "live" means in this context and I admit I'm not a braille expert. I'm aware of liblouis which is quite old and widely used (e.g., used by MathPlayer). I know speech-rule-engine just received funding for braille support. So hopefully there'll be more (and open-source) competition soon. But this it brings up an interesting point about MathML. If it's true that there's only one implementation, it indicated that it's too expensive to provide support for MathML. To come back to on my earlier comparison, nobody expects ATs to implement machine learning features that generate image descriptions on the fly; yet for a niche like MathML we somehow assume they'll make such an investment. This is actually a general problem of MathML (just talk to STEM publishers about their costly math workflows). MathML solutions are far and few. Yet the number of web-based based tools for math (not using MathML) is slowly but surely increasing, even expanding the notion of what math on the web can be.
I'm not sure what this describes. Could you explain? But perhaps that's really off topic now. |
As a data point, given:
WebKit respects that children-presentational is true for the @cookiecrook, given that the other two multi-platform user agents are not respecting children-presentational is true, how would you feel about our making children-presentational false for the |
In Chrome, I believe that's because they specifically removed Blink support for MathML, so these are just rendered as generic elements.
Even if WebKit updated to match other browsers, I don't think that would solve the Math problem, so I don't believe a change is warranted until a better proposal is in the works... VoiceOver users can interact with sub-section contents of MathML, but the Spitballing:
Perhaps there should be an "accessible math" incubator in WICG? |
I don't know if this is helpful as a comment in this context, but mathml seems under-specified here in general and all report as generic |
This issue had fallen off my radar somehow. But as I stated earlier in this issue:
If we were to test children-presentational=true today using the W3C's minimum-two-implementations standard, it would fail testing. Doing what is suggested in the opening report, on the other hand, would pass. Our spec is not in alignment with reality, and we have lack of interoperability. How shall we proceed? |
@cookiecrook: I get that you don't like the idea of children-presentational=false on |
@joanmarie wrote:
No. This change proposal feels like a workaround for the fact that Blink dropped its Math support entirely, and now forces web authors to use polyfills like MathJAX. If WebKit were to implement it this way, it would break accessible MathML support on iOS and macOS. With the tree representation of Math, VoiceOver users get 1) Nemeth or other math braille formats natively, and 2) sub-formula exploration (e.g. with or without braille, users can interact and dig into the denominator portion of a complex fraction in a formula). I don't think it makes sense to break the best native implementation of accessible math in order to work around the fact that other browsers don't support math at all. |
Apologies. I may have gotten my wires crossed here with the phrasing of the specific question. For MathML, WebKit needs to expose the children nodes (MathML-based roles like However, for ARIA math (which is still under-specified), it could go either way. Ideally, there would be a new, disambiguous string (LaTeX seems most logical because it is linearizable) that would define the intent of the mathematical formula. Once this is supported, childrenpresentational=false could be fine on generic ARIA math, but possibly not on MathML.
|
Sorry for any wiring-crossing I've done. To be clear, the scenario we're talking about is NOT MathML. Consider as a contrived example:
Should the
Suddenly the input is in the accessibility tree in Safari, tabbing to the input causes VoiceOver to tell me I'm in the input, and navigation between the input and the rest of the content in the div works smoothly. Mind you, I'm not trying to suggest that authors should do the above. Nor am I suggesting the What I am saying is this and only this: If an author slaps the 'math' role on a div, the children therein should be in the accessibility tree, i.e. children-presentational for I don't think this has to be a big deal. Couldn't you just treat the |
I also think we might wish to consider repurposing the |
The more I read the 1.0, 1.1, and now 1.2-in-progress For this issue, let's try to reach consensus on whether or not children of an element with |
I think this is point of confusion or contention. Both the ARIA spec and the HTML-AAM refer to these as if they are interchangeable. As long as it's made clear they are not the same, I don't have a strong preference about what happens to the ARIA "math" role.
Thanks https://webkit.org/b/196756
👍 |
I hope that what we come up with to solve issue #940 will solve the confusion. In the meantime I'll do a pull request to set children-presentational to false for the ARIA
Thanks for filing it! |
In #940 (comment), I investigated the use case where switching from "children presentational: true" to "false" would actually break things: when the equation is drawn to screen with presentational markup (e.g., @cookiecrook's example of pre-formatted ASCII, or a mix of SVG text and drawing code) but author has provided a readable version of the equation with With the proposed change (unless ARIA adds some special rules for backwards compatibility), the extra garbage markup gets exposed in addition to the label. But, the child markup is already exposed in Chrome and Firefox, so that the change wouldn't break anything that isn't already broken for many users. If an author was testing properly they would already be using a wrapper with It may be worth having an example of using aria-hidden on presentational markup within an equation, with a warning about the change in definition from ARIA 1. E.g., working from the pre-formatted example: <div id="eq-1" role="math" aria-labelledby="eq-1-linear">
<p id="eq-1-linear" hidden>x=⟮−b±√⟮b²−4ac⟯⟯÷2a</p>
<pre aria-hidden="true">
−b±√⟮b²−4ac⟯
x = -------------
2a
</pre>
</div> |
Excellent point! Could you please add that to #940? I want to collect all the input from what the new Thanks! |
The group approved merging the change during today's ARIA WG meeting. It's been merged into the Editor's Draft. I need to write the tests, obtain the results, etc. before merging into the Working Draft as per our work flow. |
* Editorial: update implict role mappings the following are meant to be treated as generic elements: - a no href - area no href - b - bdi - bdo - pre - q - u - small related to #406 * update 3 more elements data, samp and span all map to generic as well * add missing <i> element as mapping to generic
The math role should not be children-presentational true. There are a few reasons to remove children-presentational true from math role.
1. Any MathML elements can be links
A MathML elements which has href attribute is a link. If a descendant of
<math>
(which has an implicit role="math") has an href attribute and UAs don't expose descendants, users of ATs can't operate that link. This should be avoid.Mozilla has supported the href attribute long ago and WebKit recently support the attribute.
2. Compatibility of WebKit
WebKit already exposes descendants of a
<math>
. If other implementations don't expose descendants of a<math>
element (which has an implicit role="math") per current ARIA 1.1 Draft, they will not work with ATs which work with WebKit.The text was updated successfully, but these errors were encountered: