Closed Bug 428479 Opened 16 years ago Closed 16 years ago

Support ARIA role="math"

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: aaronlev)

References

(Blocks 1 open bug)

Details

(Keywords: access, Whiteboard: High impact -- allows blind access to mathematics on the web for the next few years until math in HTML is a reality)

Attachments

(4 files, 1 obsolete file)

The ARIA role of math is for images or ASCII art that are used to display math. Basically, the author can put LaTEX in the alt text and the AT will know what to do with it.

This is a great, simple workaround until MathML or math in HTML 5 becomes a reality.
Attached file Testcase
Note: there is no role for math in ATK, so the screen readers will have to look at xml-roles in this case.
Whiteboard: High impact -- allows blind access to mathematics on the web for the next few years until math in HTML is a reality
Comment on attachment 315069 [details] [diff] [review]
Simple patch: 1) Map role="math" to ROLE_FLAT_EQUATION (in MSAA ROLE_SYSTEM_EQUATION) and 2) flatten subtree as we do for some other roles

1. As discussed on IRC, nsIAccessibleRole needs a new uuid.
2. JAWS 8 doesn't pick up either equation in the virtual buffer.
3. NVDA only picks up the text from the "text" equation. For the "image" equation the type is recognized, but its text is only 1 whitespace.
Attachment #315069 - Flags: review?(marco.zehe) → review-
The screen readers need to be changed to recognize ROLE_EQUATION. This is just our half of the implementation.

#1 is easy to fix.
Attachment #315069 - Attachment is obsolete: true
Attachment #315087 - Flags: review?(marco.zehe)
Comment on attachment 315087 [details] [diff] [review]
New UUID, otherwise the same

r+=me. accProbe sees the accessible name for the image equation. I'll create a Mochitest for it based on the testcase.
Attachment #315087 - Flags: review?(marco.zehe) → review+
Comment on attachment 315087 [details] [diff] [review]
New UUID, otherwise the same

Will document how ATs need to process this, and send to screen reader vendors.
Attachment #315087 - Flags: approval1.9?
Attachment #315102 - Flags: review?(aaronleventhal)
Comment on attachment 315087 [details] [diff] [review]
New UUID, otherwise the same

a1.9=beltzner
Attachment #315087 - Flags: approval1.9? → approval1.9+
Checked in. Leaving open until I can review Mochitest.
Could you put your discussion from irc where we have decide to have new uuid? :)
There was a new type added, so the interface uuid needed to be changed, as is the case for all interfaces if there's a change.
(In reply to comment #13)
> There was a new type added, so the interface uuid needed to be changed, as is
> the case for all interfaces if there's a change.
> 

Marco, I meant why did you add new role? Why is the equation role not suitable in this case?
(In reply to comment #14)
> (In reply to comment #13)
> Marco, I meant why did you add new role? Why is the equation role not suitable
> in this case?

Because the other one is reserved for MathML, as far as I know, with a full DOM structure etc. The new role only deals with simple, flat equation renderings via the alt or title attribute of the aria-roled tag.
(In reply to comment #15)

> Because the other one is reserved for MathML, as far as I know, with a full DOM
> structure etc. The new role only deals with simple, flat equation renderings
> via the alt or title attribute of the aria-roled tag.
> 

If we would follow to MathType then we will expose only root mathml:math, no sturctured tree. Moreover these constants are used in gecko only and they are mapped into unique platform constant. Did I miss something?
Aaron put something in the IDL's comments for this. if you look at the patch you'll find it.
(In reply to comment #17)
> Aaron put something in the IDL's comments for this. if you look at the patch
> you'll find it.
> 

If those comments would be clear with me I didn't ask actually :)
MustPrune() depends on the role and I don't want to prune for ROLE_EQUATION (used for MathML)
(In reply to comment #19)
> MustPrune() depends on the role and I don't want to prune for ROLE_EQUATION
> (used for MathML)
> 

But why since we expose mathml:math only and leaf text nodes which aren't accessible on Linux?
> But why since we expose mathml:math only and leaf text nodes which aren't
> accessible on Linux?

Eventually that's going to be fixed, once we have a spec on how to expose the rich MathML subtree. We don't know exactly what do do with the rich subtree yet, but it could even contain islands of HTML within it (including focusable objects). We don't want to flatten it.
So we're not going to follow MathType approach to expose mathml:math only and provide description to sound the formula?
Do you have more info on that? I don't think we actually can? What if there is a textfield inside the square root? Or a button?
Aaron, see bug 427330 for an idea Surkov has on this.
Comment on attachment 315102 [details] [diff] [review]
Mochitest derived from testcase

r=me with comment discussed on irc
Attachment #315102 - Flags: review?(aaronleventhal) → review+
Marco, please put new version of the patch before commiting since I didn't put my comment here :)
Addressing the comments made on IRC:
1. Move the check for the accessible out of the "catch" block.
2. Don't queryInterface on nsIAccessible, getAccessibleFor already returns that.
3. Only execute doTest if accessible is present.
4. Rename accService to accRetrieval.
Checking in accessible/tests/mochitest/Makefile.in;
/cvsroot/mozilla/accessible/tests/mochitest/Makefile.in,v  <--  Makefile.in
new revision: 1.13; previous revision: 1.12
done
RCS file: /cvsroot/mozilla/accessible/tests/mochitest/test_bug428479.html,v
done
Checking in accessible/tests/mochitest/test_bug428479.html;
/cvsroot/mozilla/accessible/tests/mochitest/test_bug428479.html,v  <--  test_bug428479.html
initial revision: 1.1
done

This completes the fix for this bug.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: