w3c / aria-practices

WAI-ARIA Authoring Practices Guide (APG)
https://www.w3.org/wai/aria/apg/
Other
1.21k stars 338 forks source link

Consider adding guidance related to including interactive objects and MathML in live regions #696

Open joanmarie opened 6 years ago

joanmarie commented 6 years ago

At the AIM Web Accessibility of Mathematics workshop, some participants indicated that they would like to be able to include a MathML math element in a live region and have screen readers not flatten the text underneath when presenting that live region.

Example: In a math editor, pressing BackSpace once to delete a fraction should cause the screen reader to present the entire fraction and not just the string that is the numerator and the string that is the denominator as static text.

The subsequent discussion boiled down to, this should be doable. In fact, NVDA prototyped it and I implemented and committed support in Orca for this. And the spec doesn't seem to explicitly prohibit it. However, the group also concluded that we hadn't ever considered authors might wish to do this (which is why screen readers just flatten the tree into a string). Assuming there is no good reason why this should not be allowed, we feel that there some be authoring guidance so that authors don't do BadThings(tm).

Another use case that subsequently came up was a rich-text editor in which widgets could be inserted and deleted. If you insert or delete a button, you wouldn't want to lose the button role.

mcking65 commented 6 years ago

Happy to consider ... but still not clear about the author's part in making this happen. It's not clear why live is being used or which element is live.

In the backspace example, is the author making the edit area live with aria-relevant including removals?

pbblair commented 6 years ago

I have just recently run into this. My team is in the midst of authoring an educational math game for elementary school, where a student can interact with math objects. We'd like to be able to use MathML to describe the objects. This is because:

  1. We can take advantage of well-established speech rules, instead of inventing our own, and
  2. In the right configurations, braille displays will display math notation instead of English text.

In the game's idle state, a student can control focus and move to and from various math objects, but once the user interacts, we would like to use a live region to make an announcement that the game state has changed... something like "one-half has been selected and is incorrect".

Ideally, we could place the MathML itself into the live region so we benefit from the two advantages mentioned above.

Adriani90 commented 5 years ago

@@benetech might want to comment on this as well. The issue reported to NVDA was on behalf of this organisation which created the examples.