-
Notifications
You must be signed in to change notification settings - Fork 27
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 of svg/math tags in non-SVG/non-MathML namespaces #344
Comments
AXNodeObject::NativeRoleIgnoringAria() currently uses role "math" for elements whose tag name is "math", even when they are not in the MathML namespace e.g. elements constructed by JavaScript calls like document.createElementNS("https://example.com/namespace", "math"). The specification is not really explicit about namespaces [1] but it seems that the intention is to handle the normal case (math tag in the MathML namespace). This CL restricts default "math" role accordingly and adds a test for this and similar cases with the svg tag name. [1] w3c/html-aam#344 AX-Relnotes: <math> tags in non-MathML namespaces no longer have role "math" by default. Users should use an explicit attribute instead. Bug: 6606, 1038895, 1051115 Change-Id: Ifee04f4bbbd96b86686422bc0b0f99bf4cbaf54b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3168497 Reviewed-by: Nektarios Paisios <[email protected]> Commit-Queue: Frédéric Wang <[email protected]> Cr-Commit-Position: refs/heads/main@{#923328}
SVG points to the graphics aam where the graphics-document role is defined (svg aam points to this doc as well with their mapping of A comment in the table saying to refer to also refer to svg-aam for more mappings related to svgs and their descendants can be added. Similarly, the math element points to core aam where the math role is defined. A comment, similar to what's described above for svgs, can be made to point to mathml aam for additional mappings related to math elements / their descendants. @asurkov, @joanmarie or @stevefaulkner do any of you see a need for additional updates? Would it be better to not reference the wai-aria role at all and just point to the necessary specifications for math (core aam, mathml) / svg (svg aam, graphics aam)? |
Just to be clear, my point is that this spec seems to be about mapping HTML elements, but |
yes |
* revise mapping tables for svg and math closes #344 * removing some unintended whitespace changes * removing more unintended whitespace changes * Update index.html
AXNodeObject::NativeRoleIgnoringAria() currently uses role "math" for elements whose tag name is "math", even when they are not in the MathML namespace e.g. elements constructed by JavaScript calls like document.createElementNS("https://example.com/namespace", "math"). The specification is not really explicit about namespaces [1] but it seems that the intention is to handle the normal case (math tag in the MathML namespace). This CL restricts default "math" role accordingly and adds a test for this and similar cases with the svg tag name. [1] w3c/html-aam#344 AX-Relnotes: <math> tags in non-MathML namespaces no longer have role "math" by default. Users should use an explicit attribute instead. Bug: 6606, 1038895, 1051115 Change-Id: Ifee04f4bbbd96b86686422bc0b0f99bf4cbaf54b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3168497 Reviewed-by: Nektarios Paisios <[email protected]> Commit-Queue: Frédéric Wang <[email protected]> Cr-Commit-Position: refs/heads/main@{#923328} NOKEYCHECK=True GitOrigin-RevId: e929ccd6402c234b3456692a2a05d76edf72bb3a
cc @asurkov
The HTML-aam spec defines "how user agents map HTML elements" which I interpret it as elements in the HTML namespace ( see https://html.spec.whatwg.org/multipage/infrastructure.html#html-elements ). However, it also describes mapping for the
<svg>
and<math>
elements which are not HTML elements, even if they are described in HTML5 (note that they are respectively put in the SVG and MathML namespaces by the parser).Mapping for
<svg>
is actually already defined in svg-aam and it was suggested that html-aam cross-references it in #43 (comment)Mapping for
<math>
is not defined in mathml-aam but it looks like this is the place where it should be ( see w3c/mathml-aam#9 )If you want to keep
<svg>
and<math>
in the HTML-aam spec, I believe you should be explicit about namespaces to avoid confusion. For example, I noticed that Chromium seems to only check the local name to map tagmath
to rolemath
, which means it currently performs the mapping for non-MathML<math>
tag too: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/accessibility/ax_node_object.cc;l=1005;drc=4b13e65c914599d4be74a9f4db257fa1218b865bThe text was updated successfully, but these errors were encountered: