Skip to content
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

Open
fred-wang opened this issue Sep 18, 2021 · 2 comments
Open

Mapping for math and mphantom tags are missing #9

fred-wang opened this issue Sep 18, 2021 · 2 comments

Comments

@fred-wang
Copy link
Contributor

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 style visibility: 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/

@asurkov
Copy link
Contributor

asurkov commented Sep 22, 2021

Sounds like a two separate issue with me, but

I'd say <mphantom> should not be mapped to the accessibility tree until default styling is applied; if the style gets overridden and the element gets visible then it should be mapped the same way as mrow element.

<math> should be moved to mathml-amm spec from html-aam apparently. Something suggests me that HTML5 used to define <math> and that's why it was placed into html-aam, but I might be wrong on it. Now MathML core defines <math> element (https://w3c.github.io/mathml-core/#the-top-level-math-element), so it should be moved to mathml-aam spec.

@fred-wang
Copy link
Contributor Author

Sounds like a two separate issue with me, but

Yes, I was checking the list of unmapped elements and found only two, so I thought they could go in the same issue.

I'd say <mphantom> should not be mapped to the accessibility tree until default styling is applied; if the style gets overridden and the element gets visible then it should be mapped the same way as mrow element.

Default style is visibiliy: hidden, so I think it's not exposed by default. And treating as mrow and similar elements sounds good to me.

<math> should be moved to mathml-amm spec from html-aam apparently. Something suggests me that HTML5 used to define <math> and that's why it was placed into html-aam, but I might be wrong on it. Now MathML core defines <math> element (https://w3c.github.io/mathml-core/#the-top-level-math-element), so it should be moved to mathml-aam spec.

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

pull bot pushed a commit to luojiguicai/chromium that referenced this issue Oct 20, 2021
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 <[email protected]>
Reviewed-by: Tom Sepez <[email protected]>
Reviewed-by: Nektarios Paisios <[email protected]>
Cr-Commit-Position: refs/heads/main@{#933395}
blueboxd pushed a commit to blueboxd/chromium-legacy that referenced this issue Oct 20, 2021
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 <[email protected]>
Reviewed-by: Nektarios Paisios <[email protected]>
Reviewed-by: Tom Sepez <[email protected]>
Cr-Commit-Position: refs/heads/main@{#933442}
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this issue Oct 14, 2022
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 <[email protected]>
Reviewed-by: Tom Sepez <[email protected]>
Reviewed-by: Nektarios Paisios <[email protected]>
Cr-Commit-Position: refs/heads/main@{#933395}
NOKEYCHECK=True
GitOrigin-RevId: 6ee95856677e69393c28b5c03142d29e79e69c49
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this issue Oct 14, 2022
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 <[email protected]>
Reviewed-by: Nektarios Paisios <[email protected]>
Reviewed-by: Tom Sepez <[email protected]>
Cr-Commit-Position: refs/heads/main@{#933442}
NOKEYCHECK=True
GitOrigin-RevId: d6d648b6dc54c1c78936dc506e5ccebe23cee7a3
fred-wang added a commit to fred-wang/mathml-aam that referenced this issue Aug 29, 2023
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
pkra pushed a commit to w3c/aria that referenced this issue May 21, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants