-
Notifications
You must be signed in to change notification settings - Fork 8
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
Mapping for math and mphantom tags are missing #9
Comments
Sounds like a two separate issue with me, but I'd say
|
Yes, I was checking the list of unmapped elements and found only two, so I thought they could go in the same issue.
Default style is visibiliy: hidden, so I think it's not exposed by default. And treating as
I think it was in MathML3 in the past and the mathml-aam spec didn't exist. Anyway, I guess we can add it anyway (like svg-aam does) and wait for w3c/html-aam#344 |
Typical use case for ARIA role="math" [1] is to provide HTML markup with math content in a textual representation. Chrome currently treats nodes with such a role as a leaf, with presentational children and supporting name from contents. This is however the contrary to what is desired for MathML's <math> element (at least on ATK and AX API), for which the MathML descendants are expected to be exposed in the accessibility tree and for which spoken text is determined by the AT from these descendants. The MathML AAM spec currently does not specify how to map the <math> tag [2] but the HTML AAM spec says it should use role="math" with WAI-ARIA mapping [3]. This CL introduces an internal mathMLMath role that is used for the default role of the <math> tag and is following the same mapping. It enables the exposure difference mentioned above while still preserving backward compatibility for content using role="math". While MathMLCore is disabled, the <math> tag remains mapped to role="math" by default. AX-Relnotes: n/a. [1] https://w3c.github.io/aria/#math [2] w3c/mathml-aam#9 [3] https://w3c.github.io/html-aam/#html-element-role-mappings Bug: 6606, 1038895, 1051115 Change-Id: I47dedcb53e8496e40142dc5d2d53c1f2ebe6b918 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3222742 Commit-Queue: Frédéric Wang <fwang@igalia.com> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nektarios Paisios <nektar@chromium.org> Cr-Commit-Position: refs/heads/main@{#933395}
This CL introduces the minimal number of MathML roles so that one can implement role and attribute mapping for ATK and AX API [1]. Exact roles for some tags are still being discussed on the spec side and might change in the future [2] [3] [4] [5] [6]. On Windows and Android platforms, math roles is a bit undefined and so some dummy role mapping is used right now. Node tests are added to cover all elements of MathML Core. These new tests also verify that the MathML element tags are exposed as an AtkObject attribute. [1] https://w3c.github.io/mathml-aam/ [2] w3c/mathml-aam#9 [3] w3c/mathml-aam#11 [4] w3c/mathml-aam#12 [5] w3c/mathml-aam#13 [6] w3c/mathml-aam#14 AX-Relnotes: MathML elements are exposed in the accessible tree with specific roles. Bug: 6606, 1038895, 1051115, 1038897, 1038898, 1038899, 1038900, 1038901, 1038911, 1038913, 1052420 Change-Id: I7e857a0cfc05616a30bf4842e334c1dfde082d49 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3207929 Commit-Queue: Frédéric Wang <fwang@igalia.com> Reviewed-by: Nektarios Paisios <nektar@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Cr-Commit-Position: refs/heads/main@{#933442}
Typical use case for ARIA role="math" [1] is to provide HTML markup with math content in a textual representation. Chrome currently treats nodes with such a role as a leaf, with presentational children and supporting name from contents. This is however the contrary to what is desired for MathML's <math> element (at least on ATK and AX API), for which the MathML descendants are expected to be exposed in the accessibility tree and for which spoken text is determined by the AT from these descendants. The MathML AAM spec currently does not specify how to map the <math> tag [2] but the HTML AAM spec says it should use role="math" with WAI-ARIA mapping [3]. This CL introduces an internal mathMLMath role that is used for the default role of the <math> tag and is following the same mapping. It enables the exposure difference mentioned above while still preserving backward compatibility for content using role="math". While MathMLCore is disabled, the <math> tag remains mapped to role="math" by default. AX-Relnotes: n/a. [1] https://w3c.github.io/aria/#math [2] w3c/mathml-aam#9 [3] https://w3c.github.io/html-aam/#html-element-role-mappings Bug: 6606, 1038895, 1051115 Change-Id: I47dedcb53e8496e40142dc5d2d53c1f2ebe6b918 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3222742 Commit-Queue: Frédéric Wang <fwang@igalia.com> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nektarios Paisios <nektar@chromium.org> Cr-Commit-Position: refs/heads/main@{#933395} NOKEYCHECK=True GitOrigin-RevId: 6ee95856677e69393c28b5c03142d29e79e69c49
This CL introduces the minimal number of MathML roles so that one can implement role and attribute mapping for ATK and AX API [1]. Exact roles for some tags are still being discussed on the spec side and might change in the future [2] [3] [4] [5] [6]. On Windows and Android platforms, math roles is a bit undefined and so some dummy role mapping is used right now. Node tests are added to cover all elements of MathML Core. These new tests also verify that the MathML element tags are exposed as an AtkObject attribute. [1] https://w3c.github.io/mathml-aam/ [2] w3c/mathml-aam#9 [3] w3c/mathml-aam#11 [4] w3c/mathml-aam#12 [5] w3c/mathml-aam#13 [6] w3c/mathml-aam#14 AX-Relnotes: MathML elements are exposed in the accessible tree with specific roles. Bug: 6606, 1038895, 1051115, 1038897, 1038898, 1038899, 1038900, 1038901, 1038911, 1038913, 1052420 Change-Id: I7e857a0cfc05616a30bf4842e334c1dfde082d49 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3207929 Commit-Queue: Frédéric Wang <fwang@igalia.com> Reviewed-by: Nektarios Paisios <nektar@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Cr-Commit-Position: refs/heads/main@{#933442} NOKEYCHECK=True GitOrigin-RevId: d6d648b6dc54c1c78936dc506e5ccebe23cee7a3
See discussion in [1]. Per MathML Core [2], `<mphantom>` has style `visibility: hidden` by default and so is not exposed to ATs [3]. This commit specifies how to map `<mphantom>` when the element is exposed (e.g. by reverting `visibility: hidden`), essentially following what exists for the `<mrow>` element. [1] w3c#9 [2] https://w3c.github.io/mathml-core/#making-sub-expressions-invisible-mphantom [3] https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion
See discussion in [1]. Per MathML Core [2], `<mphantom>` has style `visibility: hidden` by default and so is not exposed to ATs [3]. This commit specifies how to map `<mphantom>` when the element is exposed (e.g. by reverting `visibility: hidden`), essentially following what exists for the `<mrow>` element. [1] w3c/mathml-aam#9 [2] https://w3c.github.io/mathml-core/#making-sub-expressions-invisible-mphantom [3] https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion
cc @asurkov
MathML Core elements are listed here: https://w3c.github.io/mathml-core/#mathml-elements-and-attributes
It seems mapping for
<math>
and<mphantom>
are missing.<mphantom>
is essentially an<mrow>
with default stylevisibility: hidden
( https://w3c.github.io/mathml-core/#making-sub-expressions-invisible-mphantom ) so it generally does not show up in the accessibility tree. What should we do if someone reverts that CSS style? Still don't create any node in the accessibility tree? Or follow the same mapping as for<mrow>
?The mapping for
<math>
is defined in https://w3c.github.io/html-aam/ although it's not a HTML element. Note that the same is true for<svg>
but mapping it still repeated in https://w3c.github.io/svg-aam/The text was updated successfully, but these errors were encountered: