From d6d648b6dc54c1c78936dc506e5ccebe23cee7a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= Date: Wed, 20 Oct 2021 13:25:17 +0000 Subject: [PATCH] Map MathML elements to specific roles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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] https://github.com/w3c/mathml-aam/issues/9 [3] https://github.com/w3c/mathml-aam/issues/11 [4] https://github.com/w3c/mathml-aam/issues/12 [5] https://github.com/w3c/mathml-aam/issues/13 [6] https://github.com/w3c/mathml-aam/issues/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 Reviewed-by: Nektarios Paisios Reviewed-by: Tom Sepez Cr-Commit-Position: refs/heads/main@{#933442} --- .../browser_accessibility_android.cc | 23 +++++ .../dump_accessibility_node_browsertest.cc | 95 +++++++++++++++++++ .../html/math-expected-android.txt | 13 ++- .../html/math-expected-auralinux.txt | 21 ++-- .../accessibility/html/math-expected-mac.txt | 23 +++-- .../html/math-expected-uia-win.txt | 21 ++-- .../accessibility/html/math-expected-win.txt | 23 +++-- ...math-name-from-contents-expected-blink.txt | 16 ++-- .../annotation-node-expected-auralinux.txt | 1 + .../mathml/annotation-node-expected-blink.txt | 1 + .../mathml/annotation-node-expected-mac.txt | 1 + ...annotation-xml-node-expected-auralinux.txt | 1 + .../annotation-xml-node-expected-blink.txt | 1 + .../annotation-xml-node-expected-mac.txt | 1 + .../accessibility/mathml/annotation-xml.html | 21 ++++ .../data/accessibility/mathml/annotation.html | 21 ++++ .../maction-node-expected-auralinux.txt | 1 + .../mathml/maction-node-expected-blink.txt | 1 + .../mathml/maction-node-expected-mac.txt | 1 + .../data/accessibility/mathml/maction.html | 13 +++ .../mathml/math-node-expected-auralinux.txt | 1 + .../mathml/math-node-expected-blink.txt | 1 + .../mathml/math-node-expected-mac.txt | 1 + .../test/data/accessibility/mathml/math.html | 7 ++ .../mathml/merror-node-expected-auralinux.txt | 1 + .../mathml/merror-node-expected-blink.txt | 1 + .../mathml/merror-node-expected-mac.txt | 1 + .../data/accessibility/mathml/merror.html | 13 +++ .../mathml/mfrac-node-expected-auralinux.txt | 1 + .../mathml/mfrac-node-expected-blink.txt | 1 + .../mathml/mfrac-node-expected-mac.txt | 1 + .../test/data/accessibility/mathml/mfrac.html | 11 +++ .../mathml/mi-node-expected-auralinux.txt | 1 + .../mathml/mi-node-expected-blink.txt | 1 + .../mathml/mi-node-expected-mac.txt | 1 + .../test/data/accessibility/mathml/mi.html | 8 ++ .../mmultiscripts-node-expected-auralinux.txt | 1 + .../mmultiscripts-node-expected-blink.txt | 1 + .../mmultiscripts-node-expected-mac.txt | 1 + .../accessibility/mathml/mmultiscripts.html | 19 ++++ .../mathml/mn-node-expected-auralinux.txt | 1 + .../mathml/mn-node-expected-blink.txt | 1 + .../mathml/mn-node-expected-mac.txt | 1 + .../test/data/accessibility/mathml/mn.html | 8 ++ .../mathml/mo-node-expected-auralinux.txt | 1 + .../mathml/mo-node-expected-blink.txt | 1 + .../mathml/mo-node-expected-mac.txt | 1 + .../test/data/accessibility/mathml/mo.html | 8 ++ .../mathml/mover-node-expected-auralinux.txt | 1 + .../mathml/mover-node-expected-blink.txt | 1 + .../mathml/mover-node-expected-mac.txt | 1 + .../test/data/accessibility/mathml/mover.html | 11 +++ .../mpadded-node-expected-auralinux.txt | 1 + .../mathml/mpadded-node-expected-blink.txt | 1 + .../mathml/mpadded-node-expected-mac.txt | 1 + .../data/accessibility/mathml/mpadded.html | 14 +++ .../mphantom-node-expected-auralinux.txt | 1 + .../mathml/mphantom-node-expected-blink.txt | 1 + .../mathml/mphantom-node-expected-mac.txt | 1 + .../data/accessibility/mathml/mphantom.html | 8 ++ .../mprescripts-node-expected-auralinux.txt | 1 + .../mprescripts-node-expected-blink.txt | 1 + .../mathml/mprescripts-node-expected-mac.txt | 1 + .../accessibility/mathml/mprescripts.html | 19 ++++ .../mathml/mroot-node-expected-auralinux.txt | 1 + .../mathml/mroot-node-expected-blink.txt | 1 + .../mathml/mroot-node-expected-mac.txt | 1 + .../test/data/accessibility/mathml/mroot.html | 11 +++ .../mathml/mrow-node-expected-auralinux.txt | 1 + .../mathml/mrow-node-expected-blink.txt | 1 + .../mathml/mrow-node-expected-mac.txt | 1 + .../test/data/accessibility/mathml/mrow.html | 13 +++ .../mathml/ms-node-expected-auralinux.txt | 1 + .../mathml/ms-node-expected-blink.txt | 1 + .../mathml/ms-node-expected-mac.txt | 1 + .../test/data/accessibility/mathml/ms.html | 8 ++ .../mathml/msqrt-node-expected-auralinux.txt | 1 + .../mathml/msqrt-node-expected-blink.txt | 1 + .../mathml/msqrt-node-expected-mac.txt | 1 + .../test/data/accessibility/mathml/msqrt.html | 13 +++ .../mathml/mstyle-node-expected-auralinux.txt | 1 + .../mathml/mstyle-node-expected-blink.txt | 1 + .../mathml/mstyle-node-expected-mac.txt | 1 + .../data/accessibility/mathml/mstyle.html | 13 +++ .../mathml/msub-node-expected-auralinux.txt | 1 + .../mathml/msub-node-expected-blink.txt | 1 + .../mathml/msub-node-expected-mac.txt | 1 + .../test/data/accessibility/mathml/msub.html | 11 +++ .../msubsup-node-expected-auralinux.txt | 1 + .../mathml/msubsup-node-expected-blink.txt | 1 + .../mathml/msubsup-node-expected-mac.txt | 1 + .../data/accessibility/mathml/msubsup.html | 12 +++ .../mathml/msup-node-expected-auralinux.txt | 1 + .../mathml/msup-node-expected-blink.txt | 1 + .../mathml/msup-node-expected-mac.txt | 1 + .../test/data/accessibility/mathml/msup.html | 11 +++ .../mathml/mtable-node-expected-auralinux.txt | 1 + .../mathml/mtable-node-expected-blink.txt | 1 + .../mathml/mtable-node-expected-mac.txt | 1 + .../data/accessibility/mathml/mtable.html | 19 ++++ .../mathml/mtd-node-expected-auralinux.txt | 1 + .../mathml/mtd-node-expected-blink.txt | 1 + .../mathml/mtd-node-expected-mac.txt | 1 + .../test/data/accessibility/mathml/mtd.html | 19 ++++ .../mathml/mtext-node-expected-auralinux.txt | 1 + .../mathml/mtext-node-expected-blink.txt | 1 + .../mathml/mtext-node-expected-mac.txt | 1 + .../test/data/accessibility/mathml/mtext.html | 8 ++ .../mathml/mtr-node-expected-auralinux.txt | 1 + .../mathml/mtr-node-expected-blink.txt | 1 + .../mathml/mtr-node-expected-mac.txt | 1 + .../test/data/accessibility/mathml/mtr.html | 19 ++++ .../mathml/munder-node-expected-auralinux.txt | 1 + .../mathml/munder-node-expected-blink.txt | 1 + .../mathml/munder-node-expected-mac.txt | 1 + .../data/accessibility/mathml/munder.html | 11 +++ .../munderover-node-expected-auralinux.txt | 1 + .../mathml/munderover-node-expected-blink.txt | 1 + .../mathml/munderover-node-expected-mac.txt | 1 + .../data/accessibility/mathml/munderover.html | 12 +++ .../mathml/none-node-expected-auralinux.txt | 1 + .../mathml/none-node-expected-blink.txt | 1 + .../mathml/none-node-expected-mac.txt | 1 + .../test/data/accessibility/mathml/none.html | 19 ++++ .../semantics-node-expected-auralinux.txt | 1 + .../mathml/semantics-node-expected-blink.txt | 1 + .../mathml/semantics-node-expected-mac.txt | 1 + .../data/accessibility/mathml/semantics.html | 18 ++++ extensions/common/api/automation.idl | 21 ++++ .../core/mathml/mathml_tag_names.json5 | 8 ++ .../modules/accessibility/ax_layout_object.cc | 1 + .../modules/accessibility/ax_node_object.cc | 61 +++++++++++- .../modules/accessibility/ax_object.cc | 21 ++++ .../element-role-mapping-normal-expected.txt | 30 +++--- .../closure_compiler/externs/automation.js | 21 ++++ ui/accessibility/ax_enum_util.cc | 42 ++++++++ ui/accessibility/ax_enums.mojom | 27 +++++- ui/accessibility/ax_role_properties.cc | 6 +- .../platform/ax_platform_node_auralinux.cc | 43 +++++++++ .../platform/ax_platform_node_cocoa.mm | 43 +++++++++ .../platform/ax_platform_node_win.cc | 75 +++++++++++++++ 141 files changed, 1052 insertions(+), 70 deletions(-) create mode 100644 content/test/data/accessibility/mathml/annotation-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/annotation-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/annotation-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/annotation-xml-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/annotation-xml-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/annotation-xml-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/annotation-xml.html create mode 100644 content/test/data/accessibility/mathml/annotation.html create mode 100644 content/test/data/accessibility/mathml/maction-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/maction-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/maction-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/maction.html create mode 100644 content/test/data/accessibility/mathml/math-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/math-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/math-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/math.html create mode 100644 content/test/data/accessibility/mathml/merror-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/merror-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/merror-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/merror.html create mode 100644 content/test/data/accessibility/mathml/mfrac-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/mfrac-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/mfrac-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/mfrac.html create mode 100644 content/test/data/accessibility/mathml/mi-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/mi-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/mi-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/mi.html create mode 100644 content/test/data/accessibility/mathml/mmultiscripts-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/mmultiscripts-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/mmultiscripts-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/mmultiscripts.html create mode 100644 content/test/data/accessibility/mathml/mn-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/mn-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/mn-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/mn.html create mode 100644 content/test/data/accessibility/mathml/mo-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/mo-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/mo-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/mo.html create mode 100644 content/test/data/accessibility/mathml/mover-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/mover-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/mover-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/mover.html create mode 100644 content/test/data/accessibility/mathml/mpadded-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/mpadded-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/mpadded-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/mpadded.html create mode 100644 content/test/data/accessibility/mathml/mphantom-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/mphantom-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/mphantom-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/mphantom.html create mode 100644 content/test/data/accessibility/mathml/mprescripts-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/mprescripts-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/mprescripts-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/mprescripts.html create mode 100644 content/test/data/accessibility/mathml/mroot-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/mroot-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/mroot-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/mroot.html create mode 100644 content/test/data/accessibility/mathml/mrow-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/mrow-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/mrow-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/mrow.html create mode 100644 content/test/data/accessibility/mathml/ms-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/ms-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/ms-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/ms.html create mode 100644 content/test/data/accessibility/mathml/msqrt-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/msqrt-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/msqrt-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/msqrt.html create mode 100644 content/test/data/accessibility/mathml/mstyle-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/mstyle-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/mstyle-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/mstyle.html create mode 100644 content/test/data/accessibility/mathml/msub-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/msub-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/msub-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/msub.html create mode 100644 content/test/data/accessibility/mathml/msubsup-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/msubsup-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/msubsup-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/msubsup.html create mode 100644 content/test/data/accessibility/mathml/msup-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/msup-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/msup-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/msup.html create mode 100644 content/test/data/accessibility/mathml/mtable-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/mtable-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/mtable-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/mtable.html create mode 100644 content/test/data/accessibility/mathml/mtd-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/mtd-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/mtd-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/mtd.html create mode 100644 content/test/data/accessibility/mathml/mtext-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/mtext-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/mtext-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/mtext.html create mode 100644 content/test/data/accessibility/mathml/mtr-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/mtr-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/mtr-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/mtr.html create mode 100644 content/test/data/accessibility/mathml/munder-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/munder-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/munder-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/munder.html create mode 100644 content/test/data/accessibility/mathml/munderover-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/munderover-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/munderover-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/munderover.html create mode 100644 content/test/data/accessibility/mathml/none-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/none-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/none-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/none.html create mode 100644 content/test/data/accessibility/mathml/semantics-node-expected-auralinux.txt create mode 100644 content/test/data/accessibility/mathml/semantics-node-expected-blink.txt create mode 100644 content/test/data/accessibility/mathml/semantics-node-expected-mac.txt create mode 100644 content/test/data/accessibility/mathml/semantics.html diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc index bfa9a764a5183c..1f315cbbb0d4cc 100644 --- a/content/browser/accessibility/browser_accessibility_android.cc +++ b/content/browser/accessibility/browser_accessibility_android.cc @@ -1464,6 +1464,29 @@ std::u16string BrowserAccessibilityAndroid::GetRoleDescription() const { case ax::mojom::Role::kMathMLMath: message_id = IDS_AX_ROLE_MATH; break; + case ax::mojom::Role::kMathMLFraction: + case ax::mojom::Role::kMathMLIdentifier: + case ax::mojom::Role::kMathMLMultiscripts: + case ax::mojom::Role::kMathMLNoneScript: + case ax::mojom::Role::kMathMLNumber: + case ax::mojom::Role::kMathMLOperator: + case ax::mojom::Role::kMathMLOver: + case ax::mojom::Role::kMathMLPrescriptDelimiter: + case ax::mojom::Role::kMathMLRoot: + case ax::mojom::Role::kMathMLRow: + case ax::mojom::Role::kMathMLSquareRoot: + case ax::mojom::Role::kMathMLStringLiteral: + case ax::mojom::Role::kMathMLSub: + case ax::mojom::Role::kMathMLSubSup: + case ax::mojom::Role::kMathMLSup: + case ax::mojom::Role::kMathMLTable: + case ax::mojom::Role::kMathMLTableCell: + case ax::mojom::Role::kMathMLTableRow: + case ax::mojom::Role::kMathMLText: + case ax::mojom::Role::kMathMLUnder: + case ax::mojom::Role::kMathMLUnderOver: + // No role description. + break; case ax::mojom::Role::kMenu: message_id = IDS_AX_ROLE_MENU; break; diff --git a/content/browser/accessibility/dump_accessibility_node_browsertest.cc b/content/browser/accessibility/dump_accessibility_node_browsertest.cc index e0dcf225c09c08..8dbc18d3b62b18 100644 --- a/content/browser/accessibility/dump_accessibility_node_browsertest.cc +++ b/content/browser/accessibility/dump_accessibility_node_browsertest.cc @@ -5,6 +5,7 @@ #include "base/files/file_util.h" #include "content/browser/accessibility/dump_accessibility_browsertest_base.h" #include "content/browser/web_contents/web_contents_impl.h" +#include "content/public/common/content_switches.h" #include "content/public/test/browser_test.h" #include "content/public/test/content_browser_test_utils.h" #include "content/shell/browser/shell.h" @@ -24,6 +25,9 @@ class DumpAccessibilityNodeTest : public DumpAccessibilityTestBase { // which include a select element descendant. base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( switches::kDisableAXMenuList, "false"); + // Enable MathMLCore for some MathML tests. + base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( + switches::kEnableBlinkFeatures, "MathMLCore"); } std::vector DefaultFilters() const override { @@ -166,9 +170,100 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, // // MathML tests. // + +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLAction) { + RunMathMLTest(FILE_PATH_LITERAL("maction.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLAnnotation) { + RunMathMLTest(FILE_PATH_LITERAL("annotation.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLAnnotationXML) { + RunMathMLTest(FILE_PATH_LITERAL("annotation-xml.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLError) { + RunMathMLTest(FILE_PATH_LITERAL("merror.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLFraction) { + RunMathMLTest(FILE_PATH_LITERAL("mfrac.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLIdentifier) { + RunMathMLTest(FILE_PATH_LITERAL("mi.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLMath) { + RunMathMLTest(FILE_PATH_LITERAL("math.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLMultiscripts) { + RunMathMLTest(FILE_PATH_LITERAL("mmultiscripts.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLNone) { + RunMathMLTest(FILE_PATH_LITERAL("none.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLNumber) { + RunMathMLTest(FILE_PATH_LITERAL("mn.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLOperator) { + RunMathMLTest(FILE_PATH_LITERAL("mo.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLOver) { + RunMathMLTest(FILE_PATH_LITERAL("mover.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLPadded) { + RunMathMLTest(FILE_PATH_LITERAL("mpadded.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLPhantom) { + RunMathMLTest(FILE_PATH_LITERAL("mphantom.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLPrescripts) { + RunMathMLTest(FILE_PATH_LITERAL("mprescripts.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLRoot) { + RunMathMLTest(FILE_PATH_LITERAL("mroot.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLRow) { + RunMathMLTest(FILE_PATH_LITERAL("mrow.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLSemantics) { + RunMathMLTest(FILE_PATH_LITERAL("semantics.html")); +} IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLSpace) { RunMathMLTest(FILE_PATH_LITERAL("mspace.html")); } +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLSquareRoot) { + RunMathMLTest(FILE_PATH_LITERAL("msqrt.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLStringLiteral) { + RunMathMLTest(FILE_PATH_LITERAL("ms.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLStyle) { + RunMathMLTest(FILE_PATH_LITERAL("mstyle.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLSub) { + RunMathMLTest(FILE_PATH_LITERAL("msub.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLSubSup) { + RunMathMLTest(FILE_PATH_LITERAL("msubsup.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLSup) { + RunMathMLTest(FILE_PATH_LITERAL("msup.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLTable) { + RunMathMLTest(FILE_PATH_LITERAL("mtable.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLTableCell) { + RunMathMLTest(FILE_PATH_LITERAL("mtd.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLTableRow) { + RunMathMLTest(FILE_PATH_LITERAL("mtr.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLText) { + RunMathMLTest(FILE_PATH_LITERAL("mtext.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLUnder) { + RunMathMLTest(FILE_PATH_LITERAL("munder.html")); +} +IN_PROC_BROWSER_TEST_P(DumpAccessibilityNodeTest, MathMLUnderOver) { + RunMathMLTest(FILE_PATH_LITERAL("munderover.html")); +} // // AccName tests. diff --git a/content/test/data/accessibility/html/math-expected-android.txt b/content/test/data/accessibility/html/math-expected-android.txt index 8b323f4cfa0b56..4499202aa2153e 100644 --- a/content/test/data/accessibility/html/math-expected-android.txt +++ b/content/test/data/accessibility/html/math-expected-android.txt @@ -1,8 +1,11 @@ android.webkit.WebView focusable focused scrollable ++android.view.View ++++android.view.View role_description='math' -++++++android.widget.TextView name='%F0%9D%90%B4' -++++++android.widget.TextView name='2' -++++++android.widget.TextView name='+' -++++++android.widget.TextView name='%F0%9D%90%B5' -++++++android.widget.TextView name='2' +++++++android.view.View +++++++++android.view.View +++++++++++android.view.View name='%F0%9D%90%B4' +++++++++++android.view.View name='2' +++++++++android.view.View name='+' +++++++++android.view.View +++++++++++android.view.View name='%F0%9D%90%B5' +++++++++++android.view.View name='2' diff --git a/content/test/data/accessibility/html/math-expected-auralinux.txt b/content/test/data/accessibility/html/math-expected-auralinux.txt index 649a77d9be71a1..66d290bc50dfde 100644 --- a/content/test/data/accessibility/html/math-expected-auralinux.txt +++ b/content/test/data/accessibility/html/math-expected-auralinux.txt @@ -2,12 +2,15 @@ ++[section] ++++[math] ++++++[section] -++++++++[static] name='%F0%9D%90%B4' -++++++[section] -++++++++[static] name='2' -++++++[section] -++++++++[static] name='+' -++++++[section] -++++++++[static] name='%F0%9D%90%B5' -++++++[section] -++++++++[static] name='2' +++++++++[section] +++++++++++[static] +++++++++++++[static] name='%F0%9D%90%B4' +++++++++++[static] +++++++++++++[static] name='2' +++++++++[static] +++++++++++[static] name='+' +++++++++[section] +++++++++++[static] +++++++++++++[static] name='%F0%9D%90%B5' +++++++++++[static] +++++++++++++[static] name='2' diff --git a/content/test/data/accessibility/html/math-expected-mac.txt b/content/test/data/accessibility/html/math-expected-mac.txt index 4ecd4309e6577f..8aa39e2c48f9c1 100644 --- a/content/test/data/accessibility/html/math-expected-mac.txt +++ b/content/test/data/accessibility/html/math-expected-mac.txt @@ -1,13 +1,16 @@ AXWebArea AXRoleDescription='HTML content' ++AXGroup AXRoleDescription='group' ++++AXGroup AXSubrole=AXDocumentMath AXRoleDescription='math' -++++++AXGroup AXRoleDescription='group' -++++++++AXStaticText AXRoleDescription='text' AXValue='%F0%9D%90%B4' -++++++AXGroup AXRoleDescription='group' -++++++++AXStaticText AXRoleDescription='text' AXValue='2' -++++++AXGroup AXRoleDescription='group' -++++++++AXStaticText AXRoleDescription='text' AXValue='+' -++++++AXGroup AXRoleDescription='group' -++++++++AXStaticText AXRoleDescription='text' AXValue='%F0%9D%90%B5' -++++++AXGroup AXRoleDescription='group' -++++++++AXStaticText AXRoleDescription='text' AXValue='2' +++++++AXGroup AXSubrole=AXMathRow AXRoleDescription='group' +++++++++AXGroup AXSubrole=AXMathSubscriptSuperscript AXRoleDescription='group' +++++++++++AXGroup AXSubrole=AXMathIdentifier AXRoleDescription='group' +++++++++++++AXStaticText AXRoleDescription='text' AXValue='%F0%9D%90%B4' +++++++++++AXGroup AXSubrole=AXMathNumber AXRoleDescription='group' +++++++++++++AXStaticText AXRoleDescription='text' AXValue='2' +++++++++AXGroup AXSubrole=AXMathOperator AXRoleDescription='group' +++++++++++AXStaticText AXRoleDescription='text' AXValue='+' +++++++++AXGroup AXSubrole=AXMathSubscriptSuperscript AXRoleDescription='group' +++++++++++AXGroup AXSubrole=AXMathIdentifier AXRoleDescription='group' +++++++++++++AXStaticText AXRoleDescription='text' AXValue='%F0%9D%90%B5' +++++++++++AXGroup AXSubrole=AXMathNumber AXRoleDescription='group' +++++++++++++AXStaticText AXRoleDescription='text' AXValue='2' diff --git a/content/test/data/accessibility/html/math-expected-uia-win.txt b/content/test/data/accessibility/html/math-expected-uia-win.txt index 32537aa75d314a..9d36f33d1b3c65 100644 --- a/content/test/data/accessibility/html/math-expected-uia-win.txt +++ b/content/test/data/accessibility/html/math-expected-uia-win.txt @@ -2,12 +2,15 @@ Document ++Group IsControlElement=false ++++Group IsControlElement=false ++++++Group IsControlElement=false -++++++++Text Name='%F0%9D%90%B4' -++++++Group IsControlElement=false -++++++++Text Name='2' -++++++Group IsControlElement=false -++++++++Text Name='+' -++++++Group IsControlElement=false -++++++++Text Name='%F0%9D%90%B5' -++++++Group IsControlElement=false -++++++++Text Name='2' +++++++++Group IsControlElement=false +++++++++++Group IsControlElement=false +++++++++++++Text Name='%F0%9D%90%B4' +++++++++++Group IsControlElement=false +++++++++++++Text Name='2' +++++++++Group IsControlElement=false +++++++++++Text Name='+' +++++++++Group IsControlElement=false +++++++++++Group IsControlElement=false +++++++++++++Text Name='%F0%9D%90%B5' +++++++++++Group IsControlElement=false +++++++++++++Text Name='2' diff --git a/content/test/data/accessibility/html/math-expected-win.txt b/content/test/data/accessibility/html/math-expected-win.txt index 1208b9e894fb6d..0ecf4c82a8d0c7 100644 --- a/content/test/data/accessibility/html/math-expected-win.txt +++ b/content/test/data/accessibility/html/math-expected-win.txt @@ -1,13 +1,16 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ++IA2_ROLE_SECTION ++++ROLE_SYSTEM_EQUATION inner_html=' %F0%9D%90%B42 + %F0%9D%90%B52 ' -++++++IA2_ROLE_SECTION -++++++++ROLE_SYSTEM_STATICTEXT name='%F0%9D%90%B4' -++++++IA2_ROLE_SECTION -++++++++ROLE_SYSTEM_STATICTEXT name='2' -++++++IA2_ROLE_SECTION -++++++++ROLE_SYSTEM_STATICTEXT name='+' -++++++IA2_ROLE_SECTION -++++++++ROLE_SYSTEM_STATICTEXT name='%F0%9D%90%B5' -++++++IA2_ROLE_SECTION -++++++++ROLE_SYSTEM_STATICTEXT name='2' +++++++ROLE_SYSTEM_GROUPING +++++++++ROLE_SYSTEM_GROUPING +++++++++++ROLE_SYSTEM_GROUPING +++++++++++++ROLE_SYSTEM_STATICTEXT name='%F0%9D%90%B4' +++++++++++ROLE_SYSTEM_GROUPING +++++++++++++ROLE_SYSTEM_STATICTEXT name='2' +++++++++ROLE_SYSTEM_GROUPING +++++++++++ROLE_SYSTEM_STATICTEXT name='+' +++++++++ROLE_SYSTEM_GROUPING +++++++++++ROLE_SYSTEM_GROUPING +++++++++++++ROLE_SYSTEM_STATICTEXT name='%F0%9D%90%B5' +++++++++++ROLE_SYSTEM_GROUPING +++++++++++++ROLE_SYSTEM_STATICTEXT name='2' diff --git a/content/test/data/accessibility/html/math-name-from-contents-expected-blink.txt b/content/test/data/accessibility/html/math-name-from-contents-expected-blink.txt index ba409d5373570b..5df4d921ae20a7 100644 --- a/content/test/data/accessibility/html/math-name-from-contents-expected-blink.txt +++ b/content/test/data/accessibility/html/math-name-from-contents-expected-blink.txt @@ -1,28 +1,28 @@ rootWebArea ++genericContainer ignored ++++genericContainer ignored -++++++radioButton name='Both%C2%A01 + 4%C2%A0and%C2%A0' checkedState=false +++++++radioButton name='Both%C2%A0%C2%A0and%C2%A0' checkedState=false ++++++++staticText name='Both%C2%A0' ++++++++++inlineTextBox name='Both%C2%A0' -++++++++math name='1 + 4' -++++++++++genericContainer +++++++++math +++++++++++mathMLNumber ++++++++++++staticText name='1' ++++++++++++++inlineTextBox name='1' -++++++++++genericContainer +++++++++++mathMLOperator ++++++++++++staticText name='+' ++++++++++++++inlineTextBox name='+' -++++++++++genericContainer +++++++++++mathMLNumber ++++++++++++staticText name='4' ++++++++++++++inlineTextBox name='4' ++++++++staticText name='%C2%A0and%C2%A0' ++++++++++inlineTextBox name='%C2%A0and%C2%A0' ++++++++mathMLMath -++++++++++genericContainer +++++++++++mathMLNumber ++++++++++++staticText name='2' ++++++++++++++inlineTextBox name='2' -++++++++++genericContainer +++++++++++mathMLOperator ++++++++++++staticText name='+' ++++++++++++++inlineTextBox name='+' -++++++++++genericContainer +++++++++++mathMLNumber ++++++++++++staticText name='3' ++++++++++++++inlineTextBox name='3' diff --git a/content/test/data/accessibility/mathml/annotation-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/annotation-node-expected-auralinux.txt new file mode 100644 index 00000000000000..a15029037d497b --- /dev/null +++ b/content/test/data/accessibility/mathml/annotation-node-expected-auralinux.txt @@ -0,0 +1 @@ +[static] tag:annotation diff --git a/content/test/data/accessibility/mathml/annotation-node-expected-blink.txt b/content/test/data/accessibility/mathml/annotation-node-expected-blink.txt new file mode 100644 index 00000000000000..32fea288998478 --- /dev/null +++ b/content/test/data/accessibility/mathml/annotation-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLText diff --git a/content/test/data/accessibility/mathml/annotation-node-expected-mac.txt b/content/test/data/accessibility/mathml/annotation-node-expected-mac.txt new file mode 100644 index 00000000000000..dc05c5c057b53d --- /dev/null +++ b/content/test/data/accessibility/mathml/annotation-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathText diff --git a/content/test/data/accessibility/mathml/annotation-xml-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/annotation-xml-node-expected-auralinux.txt new file mode 100644 index 00000000000000..21207930d51a7f --- /dev/null +++ b/content/test/data/accessibility/mathml/annotation-xml-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:annotation-xml diff --git a/content/test/data/accessibility/mathml/annotation-xml-node-expected-blink.txt b/content/test/data/accessibility/mathml/annotation-xml-node-expected-blink.txt new file mode 100644 index 00000000000000..985cbc43ca5dda --- /dev/null +++ b/content/test/data/accessibility/mathml/annotation-xml-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLRow diff --git a/content/test/data/accessibility/mathml/annotation-xml-node-expected-mac.txt b/content/test/data/accessibility/mathml/annotation-xml-node-expected-mac.txt new file mode 100644 index 00000000000000..211af9ce471da9 --- /dev/null +++ b/content/test/data/accessibility/mathml/annotation-xml-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathRow diff --git a/content/test/data/accessibility/mathml/annotation-xml.html b/content/test/data/accessibility/mathml/annotation-xml.html new file mode 100644 index 00000000000000..2408203d03ef51 --- /dev/null +++ b/content/test/data/accessibility/mathml/annotation-xml.html @@ -0,0 +1,21 @@ + + + + + + 12 + \frac{1}{2} + + + + 1 + 2 + + + + diff --git a/content/test/data/accessibility/mathml/annotation.html b/content/test/data/accessibility/mathml/annotation.html new file mode 100644 index 00000000000000..060ebad92f701c --- /dev/null +++ b/content/test/data/accessibility/mathml/annotation.html @@ -0,0 +1,21 @@ + + + + + + 12 + \frac{1}{2} + + + + 1 + 2 + + + + diff --git a/content/test/data/accessibility/mathml/maction-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/maction-node-expected-auralinux.txt new file mode 100644 index 00000000000000..c7dad00dd49714 --- /dev/null +++ b/content/test/data/accessibility/mathml/maction-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:maction diff --git a/content/test/data/accessibility/mathml/maction-node-expected-blink.txt b/content/test/data/accessibility/mathml/maction-node-expected-blink.txt new file mode 100644 index 00000000000000..985cbc43ca5dda --- /dev/null +++ b/content/test/data/accessibility/mathml/maction-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLRow diff --git a/content/test/data/accessibility/mathml/maction-node-expected-mac.txt b/content/test/data/accessibility/mathml/maction-node-expected-mac.txt new file mode 100644 index 00000000000000..211af9ce471da9 --- /dev/null +++ b/content/test/data/accessibility/mathml/maction-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathRow diff --git a/content/test/data/accessibility/mathml/maction.html b/content/test/data/accessibility/mathml/maction.html new file mode 100644 index 00000000000000..94d835bda224d6 --- /dev/null +++ b/content/test/data/accessibility/mathml/maction.html @@ -0,0 +1,13 @@ + + + + + 1 + 2 + 3 + 4 + + diff --git a/content/test/data/accessibility/mathml/math-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/math-node-expected-auralinux.txt new file mode 100644 index 00000000000000..29eaf0dd096b36 --- /dev/null +++ b/content/test/data/accessibility/mathml/math-node-expected-auralinux.txt @@ -0,0 +1 @@ +[math] tag:math diff --git a/content/test/data/accessibility/mathml/math-node-expected-blink.txt b/content/test/data/accessibility/mathml/math-node-expected-blink.txt new file mode 100644 index 00000000000000..a53627197608c8 --- /dev/null +++ b/content/test/data/accessibility/mathml/math-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLMath diff --git a/content/test/data/accessibility/mathml/math-node-expected-mac.txt b/content/test/data/accessibility/mathml/math-node-expected-mac.txt new file mode 100644 index 00000000000000..4b732adfd933f4 --- /dev/null +++ b/content/test/data/accessibility/mathml/math-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXDocumentMath diff --git a/content/test/data/accessibility/mathml/math.html b/content/test/data/accessibility/mathml/math.html new file mode 100644 index 00000000000000..6ffd736cf07652 --- /dev/null +++ b/content/test/data/accessibility/mathml/math.html @@ -0,0 +1,7 @@ + + + + diff --git a/content/test/data/accessibility/mathml/merror-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/merror-node-expected-auralinux.txt new file mode 100644 index 00000000000000..7509298df350ac --- /dev/null +++ b/content/test/data/accessibility/mathml/merror-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:merror diff --git a/content/test/data/accessibility/mathml/merror-node-expected-blink.txt b/content/test/data/accessibility/mathml/merror-node-expected-blink.txt new file mode 100644 index 00000000000000..985cbc43ca5dda --- /dev/null +++ b/content/test/data/accessibility/mathml/merror-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLRow diff --git a/content/test/data/accessibility/mathml/merror-node-expected-mac.txt b/content/test/data/accessibility/mathml/merror-node-expected-mac.txt new file mode 100644 index 00000000000000..211af9ce471da9 --- /dev/null +++ b/content/test/data/accessibility/mathml/merror-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathRow diff --git a/content/test/data/accessibility/mathml/merror.html b/content/test/data/accessibility/mathml/merror.html new file mode 100644 index 00000000000000..7661eb3d3b8599 --- /dev/null +++ b/content/test/data/accessibility/mathml/merror.html @@ -0,0 +1,13 @@ + + + + + 1 + 2 + 3 + 4 + + diff --git a/content/test/data/accessibility/mathml/mfrac-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/mfrac-node-expected-auralinux.txt new file mode 100644 index 00000000000000..eb9e2aaf3b0b2a --- /dev/null +++ b/content/test/data/accessibility/mathml/mfrac-node-expected-auralinux.txt @@ -0,0 +1 @@ +[math fraction] tag:mfrac diff --git a/content/test/data/accessibility/mathml/mfrac-node-expected-blink.txt b/content/test/data/accessibility/mathml/mfrac-node-expected-blink.txt new file mode 100644 index 00000000000000..b7a2019de9109f --- /dev/null +++ b/content/test/data/accessibility/mathml/mfrac-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLFraction diff --git a/content/test/data/accessibility/mathml/mfrac-node-expected-mac.txt b/content/test/data/accessibility/mathml/mfrac-node-expected-mac.txt new file mode 100644 index 00000000000000..3714ebb31ea5f5 --- /dev/null +++ b/content/test/data/accessibility/mathml/mfrac-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathFraction diff --git a/content/test/data/accessibility/mathml/mfrac.html b/content/test/data/accessibility/mathml/mfrac.html new file mode 100644 index 00000000000000..15fbe15722e397 --- /dev/null +++ b/content/test/data/accessibility/mathml/mfrac.html @@ -0,0 +1,11 @@ + + + + + 1 + 2 + + diff --git a/content/test/data/accessibility/mathml/mi-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/mi-node-expected-auralinux.txt new file mode 100644 index 00000000000000..4d0f46859501a7 --- /dev/null +++ b/content/test/data/accessibility/mathml/mi-node-expected-auralinux.txt @@ -0,0 +1 @@ +[static] tag:mi diff --git a/content/test/data/accessibility/mathml/mi-node-expected-blink.txt b/content/test/data/accessibility/mathml/mi-node-expected-blink.txt new file mode 100644 index 00000000000000..67c947ee3d33b8 --- /dev/null +++ b/content/test/data/accessibility/mathml/mi-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLIdentifier diff --git a/content/test/data/accessibility/mathml/mi-node-expected-mac.txt b/content/test/data/accessibility/mathml/mi-node-expected-mac.txt new file mode 100644 index 00000000000000..301c38971c5bd6 --- /dev/null +++ b/content/test/data/accessibility/mathml/mi-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathIdentifier diff --git a/content/test/data/accessibility/mathml/mi.html b/content/test/data/accessibility/mathml/mi.html new file mode 100644 index 00000000000000..66e7e2fd70d7f1 --- /dev/null +++ b/content/test/data/accessibility/mathml/mi.html @@ -0,0 +1,8 @@ + + + + sin + diff --git a/content/test/data/accessibility/mathml/mmultiscripts-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/mmultiscripts-node-expected-auralinux.txt new file mode 100644 index 00000000000000..3f31713489049d --- /dev/null +++ b/content/test/data/accessibility/mathml/mmultiscripts-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:mmultiscripts diff --git a/content/test/data/accessibility/mathml/mmultiscripts-node-expected-blink.txt b/content/test/data/accessibility/mathml/mmultiscripts-node-expected-blink.txt new file mode 100644 index 00000000000000..8a665bccf70382 --- /dev/null +++ b/content/test/data/accessibility/mathml/mmultiscripts-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLMultiscripts diff --git a/content/test/data/accessibility/mathml/mmultiscripts-node-expected-mac.txt b/content/test/data/accessibility/mathml/mmultiscripts-node-expected-mac.txt new file mode 100644 index 00000000000000..8f10be3a8435e2 --- /dev/null +++ b/content/test/data/accessibility/mathml/mmultiscripts-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathMultiscript diff --git a/content/test/data/accessibility/mathml/mmultiscripts.html b/content/test/data/accessibility/mathml/mmultiscripts.html new file mode 100644 index 00000000000000..86ebf8ab3acb10 --- /dev/null +++ b/content/test/data/accessibility/mathml/mmultiscripts.html @@ -0,0 +1,19 @@ + + + + + 1 + 2 + 3 + + 5 + + 6 + + 8 + 9 + + diff --git a/content/test/data/accessibility/mathml/mn-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/mn-node-expected-auralinux.txt new file mode 100644 index 00000000000000..9c87ba85ca036c --- /dev/null +++ b/content/test/data/accessibility/mathml/mn-node-expected-auralinux.txt @@ -0,0 +1 @@ +[static] tag:mn diff --git a/content/test/data/accessibility/mathml/mn-node-expected-blink.txt b/content/test/data/accessibility/mathml/mn-node-expected-blink.txt new file mode 100644 index 00000000000000..7d77967dbafb38 --- /dev/null +++ b/content/test/data/accessibility/mathml/mn-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLNumber diff --git a/content/test/data/accessibility/mathml/mn-node-expected-mac.txt b/content/test/data/accessibility/mathml/mn-node-expected-mac.txt new file mode 100644 index 00000000000000..df559bc18c8dcd --- /dev/null +++ b/content/test/data/accessibility/mathml/mn-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathNumber diff --git a/content/test/data/accessibility/mathml/mn.html b/content/test/data/accessibility/mathml/mn.html new file mode 100644 index 00000000000000..088901e5450ee5 --- /dev/null +++ b/content/test/data/accessibility/mathml/mn.html @@ -0,0 +1,8 @@ + + + + 42 + diff --git a/content/test/data/accessibility/mathml/mo-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/mo-node-expected-auralinux.txt new file mode 100644 index 00000000000000..4446933d577dd9 --- /dev/null +++ b/content/test/data/accessibility/mathml/mo-node-expected-auralinux.txt @@ -0,0 +1 @@ +[static] tag:mo diff --git a/content/test/data/accessibility/mathml/mo-node-expected-blink.txt b/content/test/data/accessibility/mathml/mo-node-expected-blink.txt new file mode 100644 index 00000000000000..1fafde6d6566f8 --- /dev/null +++ b/content/test/data/accessibility/mathml/mo-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLOperator diff --git a/content/test/data/accessibility/mathml/mo-node-expected-mac.txt b/content/test/data/accessibility/mathml/mo-node-expected-mac.txt new file mode 100644 index 00000000000000..3ef86b83705a07 --- /dev/null +++ b/content/test/data/accessibility/mathml/mo-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathOperator diff --git a/content/test/data/accessibility/mathml/mo.html b/content/test/data/accessibility/mathml/mo.html new file mode 100644 index 00000000000000..093d53ff09559b --- /dev/null +++ b/content/test/data/accessibility/mathml/mo.html @@ -0,0 +1,8 @@ + + + + + + diff --git a/content/test/data/accessibility/mathml/mover-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/mover-node-expected-auralinux.txt new file mode 100644 index 00000000000000..50fe269ef1738b --- /dev/null +++ b/content/test/data/accessibility/mathml/mover-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:mover diff --git a/content/test/data/accessibility/mathml/mover-node-expected-blink.txt b/content/test/data/accessibility/mathml/mover-node-expected-blink.txt new file mode 100644 index 00000000000000..441eed891b043e --- /dev/null +++ b/content/test/data/accessibility/mathml/mover-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLOver diff --git a/content/test/data/accessibility/mathml/mover-node-expected-mac.txt b/content/test/data/accessibility/mathml/mover-node-expected-mac.txt new file mode 100644 index 00000000000000..0e40b2989ab67e --- /dev/null +++ b/content/test/data/accessibility/mathml/mover-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathUnderOver diff --git a/content/test/data/accessibility/mathml/mover.html b/content/test/data/accessibility/mathml/mover.html new file mode 100644 index 00000000000000..02c6909bb88ad4 --- /dev/null +++ b/content/test/data/accessibility/mathml/mover.html @@ -0,0 +1,11 @@ + + + + + 1 + 2 + + diff --git a/content/test/data/accessibility/mathml/mpadded-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/mpadded-node-expected-auralinux.txt new file mode 100644 index 00000000000000..20146b5fe1057a --- /dev/null +++ b/content/test/data/accessibility/mathml/mpadded-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:mpadded diff --git a/content/test/data/accessibility/mathml/mpadded-node-expected-blink.txt b/content/test/data/accessibility/mathml/mpadded-node-expected-blink.txt new file mode 100644 index 00000000000000..985cbc43ca5dda --- /dev/null +++ b/content/test/data/accessibility/mathml/mpadded-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLRow diff --git a/content/test/data/accessibility/mathml/mpadded-node-expected-mac.txt b/content/test/data/accessibility/mathml/mpadded-node-expected-mac.txt new file mode 100644 index 00000000000000..211af9ce471da9 --- /dev/null +++ b/content/test/data/accessibility/mathml/mpadded-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathRow diff --git a/content/test/data/accessibility/mathml/mpadded.html b/content/test/data/accessibility/mathml/mpadded.html new file mode 100644 index 00000000000000..185f18980d805b --- /dev/null +++ b/content/test/data/accessibility/mathml/mpadded.html @@ -0,0 +1,14 @@ + + + + + 1 + 2 + 3 + 4 + + diff --git a/content/test/data/accessibility/mathml/mphantom-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/mphantom-node-expected-auralinux.txt new file mode 100644 index 00000000000000..3ee534416ce63e --- /dev/null +++ b/content/test/data/accessibility/mathml/mphantom-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:mphantom diff --git a/content/test/data/accessibility/mathml/mphantom-node-expected-blink.txt b/content/test/data/accessibility/mathml/mphantom-node-expected-blink.txt new file mode 100644 index 00000000000000..985cbc43ca5dda --- /dev/null +++ b/content/test/data/accessibility/mathml/mphantom-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLRow diff --git a/content/test/data/accessibility/mathml/mphantom-node-expected-mac.txt b/content/test/data/accessibility/mathml/mphantom-node-expected-mac.txt new file mode 100644 index 00000000000000..211af9ce471da9 --- /dev/null +++ b/content/test/data/accessibility/mathml/mphantom-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathRow diff --git a/content/test/data/accessibility/mathml/mphantom.html b/content/test/data/accessibility/mathml/mphantom.html new file mode 100644 index 00000000000000..2115c0d847bd7a --- /dev/null +++ b/content/test/data/accessibility/mathml/mphantom.html @@ -0,0 +1,8 @@ + + + + + diff --git a/content/test/data/accessibility/mathml/mprescripts-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/mprescripts-node-expected-auralinux.txt new file mode 100644 index 00000000000000..0fcb8f5e70e646 --- /dev/null +++ b/content/test/data/accessibility/mathml/mprescripts-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:mprescripts diff --git a/content/test/data/accessibility/mathml/mprescripts-node-expected-blink.txt b/content/test/data/accessibility/mathml/mprescripts-node-expected-blink.txt new file mode 100644 index 00000000000000..83e93a7104e843 --- /dev/null +++ b/content/test/data/accessibility/mathml/mprescripts-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLPrescriptDelimiter diff --git a/content/test/data/accessibility/mathml/mprescripts-node-expected-mac.txt b/content/test/data/accessibility/mathml/mprescripts-node-expected-mac.txt new file mode 100644 index 00000000000000..211af9ce471da9 --- /dev/null +++ b/content/test/data/accessibility/mathml/mprescripts-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathRow diff --git a/content/test/data/accessibility/mathml/mprescripts.html b/content/test/data/accessibility/mathml/mprescripts.html new file mode 100644 index 00000000000000..5acaf808cd5e28 --- /dev/null +++ b/content/test/data/accessibility/mathml/mprescripts.html @@ -0,0 +1,19 @@ + + + + + 1 + 2 + 3 + + 5 + + 6 + + 8 + 9 + + diff --git a/content/test/data/accessibility/mathml/mroot-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/mroot-node-expected-auralinux.txt new file mode 100644 index 00000000000000..6d81a1288e4c4b --- /dev/null +++ b/content/test/data/accessibility/mathml/mroot-node-expected-auralinux.txt @@ -0,0 +1 @@ +[math root] tag:mroot diff --git a/content/test/data/accessibility/mathml/mroot-node-expected-blink.txt b/content/test/data/accessibility/mathml/mroot-node-expected-blink.txt new file mode 100644 index 00000000000000..90314660268555 --- /dev/null +++ b/content/test/data/accessibility/mathml/mroot-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLRoot diff --git a/content/test/data/accessibility/mathml/mroot-node-expected-mac.txt b/content/test/data/accessibility/mathml/mroot-node-expected-mac.txt new file mode 100644 index 00000000000000..43522af3445639 --- /dev/null +++ b/content/test/data/accessibility/mathml/mroot-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathRoot diff --git a/content/test/data/accessibility/mathml/mroot.html b/content/test/data/accessibility/mathml/mroot.html new file mode 100644 index 00000000000000..1f96950c7b7732 --- /dev/null +++ b/content/test/data/accessibility/mathml/mroot.html @@ -0,0 +1,11 @@ + + + + + 1 + 2 + + diff --git a/content/test/data/accessibility/mathml/mrow-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/mrow-node-expected-auralinux.txt new file mode 100644 index 00000000000000..1479db12104c03 --- /dev/null +++ b/content/test/data/accessibility/mathml/mrow-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:mrow diff --git a/content/test/data/accessibility/mathml/mrow-node-expected-blink.txt b/content/test/data/accessibility/mathml/mrow-node-expected-blink.txt new file mode 100644 index 00000000000000..985cbc43ca5dda --- /dev/null +++ b/content/test/data/accessibility/mathml/mrow-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLRow diff --git a/content/test/data/accessibility/mathml/mrow-node-expected-mac.txt b/content/test/data/accessibility/mathml/mrow-node-expected-mac.txt new file mode 100644 index 00000000000000..211af9ce471da9 --- /dev/null +++ b/content/test/data/accessibility/mathml/mrow-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathRow diff --git a/content/test/data/accessibility/mathml/mrow.html b/content/test/data/accessibility/mathml/mrow.html new file mode 100644 index 00000000000000..c2e1f109359fad --- /dev/null +++ b/content/test/data/accessibility/mathml/mrow.html @@ -0,0 +1,13 @@ + + + + + 1 + 2 + 3 + 4 + + diff --git a/content/test/data/accessibility/mathml/ms-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/ms-node-expected-auralinux.txt new file mode 100644 index 00000000000000..f2e8637305f563 --- /dev/null +++ b/content/test/data/accessibility/mathml/ms-node-expected-auralinux.txt @@ -0,0 +1 @@ +[static] tag:ms diff --git a/content/test/data/accessibility/mathml/ms-node-expected-blink.txt b/content/test/data/accessibility/mathml/ms-node-expected-blink.txt new file mode 100644 index 00000000000000..41a74696b34942 --- /dev/null +++ b/content/test/data/accessibility/mathml/ms-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLStringLiteral diff --git a/content/test/data/accessibility/mathml/ms-node-expected-mac.txt b/content/test/data/accessibility/mathml/ms-node-expected-mac.txt new file mode 100644 index 00000000000000..7a0cd6298b0577 --- /dev/null +++ b/content/test/data/accessibility/mathml/ms-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup diff --git a/content/test/data/accessibility/mathml/ms.html b/content/test/data/accessibility/mathml/ms.html new file mode 100644 index 00000000000000..e277bf00b80284 --- /dev/null +++ b/content/test/data/accessibility/mathml/ms.html @@ -0,0 +1,8 @@ + + + + "hello world" + diff --git a/content/test/data/accessibility/mathml/msqrt-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/msqrt-node-expected-auralinux.txt new file mode 100644 index 00000000000000..ea2c89966033a4 --- /dev/null +++ b/content/test/data/accessibility/mathml/msqrt-node-expected-auralinux.txt @@ -0,0 +1 @@ +[math root] tag:msqrt diff --git a/content/test/data/accessibility/mathml/msqrt-node-expected-blink.txt b/content/test/data/accessibility/mathml/msqrt-node-expected-blink.txt new file mode 100644 index 00000000000000..a8d0e4e127324d --- /dev/null +++ b/content/test/data/accessibility/mathml/msqrt-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLSquareRoot diff --git a/content/test/data/accessibility/mathml/msqrt-node-expected-mac.txt b/content/test/data/accessibility/mathml/msqrt-node-expected-mac.txt new file mode 100644 index 00000000000000..00a0ba37ccf7a0 --- /dev/null +++ b/content/test/data/accessibility/mathml/msqrt-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathSquareRoot diff --git a/content/test/data/accessibility/mathml/msqrt.html b/content/test/data/accessibility/mathml/msqrt.html new file mode 100644 index 00000000000000..dbf20f13a01e6b --- /dev/null +++ b/content/test/data/accessibility/mathml/msqrt.html @@ -0,0 +1,13 @@ + + + + + 1 + 2 + 3 + 4 + + diff --git a/content/test/data/accessibility/mathml/mstyle-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/mstyle-node-expected-auralinux.txt new file mode 100644 index 00000000000000..bb9bd798b28136 --- /dev/null +++ b/content/test/data/accessibility/mathml/mstyle-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:mstyle diff --git a/content/test/data/accessibility/mathml/mstyle-node-expected-blink.txt b/content/test/data/accessibility/mathml/mstyle-node-expected-blink.txt new file mode 100644 index 00000000000000..985cbc43ca5dda --- /dev/null +++ b/content/test/data/accessibility/mathml/mstyle-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLRow diff --git a/content/test/data/accessibility/mathml/mstyle-node-expected-mac.txt b/content/test/data/accessibility/mathml/mstyle-node-expected-mac.txt new file mode 100644 index 00000000000000..211af9ce471da9 --- /dev/null +++ b/content/test/data/accessibility/mathml/mstyle-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathRow diff --git a/content/test/data/accessibility/mathml/mstyle.html b/content/test/data/accessibility/mathml/mstyle.html new file mode 100644 index 00000000000000..542ed13a79c2d6 --- /dev/null +++ b/content/test/data/accessibility/mathml/mstyle.html @@ -0,0 +1,13 @@ + + + + + 1 + 2 + 3 + 4 + + diff --git a/content/test/data/accessibility/mathml/msub-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/msub-node-expected-auralinux.txt new file mode 100644 index 00000000000000..f1376928a0802a --- /dev/null +++ b/content/test/data/accessibility/mathml/msub-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:msub diff --git a/content/test/data/accessibility/mathml/msub-node-expected-blink.txt b/content/test/data/accessibility/mathml/msub-node-expected-blink.txt new file mode 100644 index 00000000000000..1c0562e0d352d8 --- /dev/null +++ b/content/test/data/accessibility/mathml/msub-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLSub diff --git a/content/test/data/accessibility/mathml/msub-node-expected-mac.txt b/content/test/data/accessibility/mathml/msub-node-expected-mac.txt new file mode 100644 index 00000000000000..66d6f932cddff5 --- /dev/null +++ b/content/test/data/accessibility/mathml/msub-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathSubscriptSuperscript diff --git a/content/test/data/accessibility/mathml/msub.html b/content/test/data/accessibility/mathml/msub.html new file mode 100644 index 00000000000000..058da4d14500c5 --- /dev/null +++ b/content/test/data/accessibility/mathml/msub.html @@ -0,0 +1,11 @@ + + + + + 1 + 2 + + diff --git a/content/test/data/accessibility/mathml/msubsup-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/msubsup-node-expected-auralinux.txt new file mode 100644 index 00000000000000..66955138407125 --- /dev/null +++ b/content/test/data/accessibility/mathml/msubsup-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:msubsup diff --git a/content/test/data/accessibility/mathml/msubsup-node-expected-blink.txt b/content/test/data/accessibility/mathml/msubsup-node-expected-blink.txt new file mode 100644 index 00000000000000..bf9a1e7e044d0b --- /dev/null +++ b/content/test/data/accessibility/mathml/msubsup-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLSubSup diff --git a/content/test/data/accessibility/mathml/msubsup-node-expected-mac.txt b/content/test/data/accessibility/mathml/msubsup-node-expected-mac.txt new file mode 100644 index 00000000000000..66d6f932cddff5 --- /dev/null +++ b/content/test/data/accessibility/mathml/msubsup-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathSubscriptSuperscript diff --git a/content/test/data/accessibility/mathml/msubsup.html b/content/test/data/accessibility/mathml/msubsup.html new file mode 100644 index 00000000000000..a8bf68c7cb670c --- /dev/null +++ b/content/test/data/accessibility/mathml/msubsup.html @@ -0,0 +1,12 @@ + + + + + 1 + 2 + 3 + + diff --git a/content/test/data/accessibility/mathml/msup-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/msup-node-expected-auralinux.txt new file mode 100644 index 00000000000000..1d1e8b1bf0f287 --- /dev/null +++ b/content/test/data/accessibility/mathml/msup-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:msup diff --git a/content/test/data/accessibility/mathml/msup-node-expected-blink.txt b/content/test/data/accessibility/mathml/msup-node-expected-blink.txt new file mode 100644 index 00000000000000..8191fcd0829735 --- /dev/null +++ b/content/test/data/accessibility/mathml/msup-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLSup diff --git a/content/test/data/accessibility/mathml/msup-node-expected-mac.txt b/content/test/data/accessibility/mathml/msup-node-expected-mac.txt new file mode 100644 index 00000000000000..66d6f932cddff5 --- /dev/null +++ b/content/test/data/accessibility/mathml/msup-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathSubscriptSuperscript diff --git a/content/test/data/accessibility/mathml/msup.html b/content/test/data/accessibility/mathml/msup.html new file mode 100644 index 00000000000000..590cd77c2130e5 --- /dev/null +++ b/content/test/data/accessibility/mathml/msup.html @@ -0,0 +1,11 @@ + + + + + 1 + 2 + + diff --git a/content/test/data/accessibility/mathml/mtable-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/mtable-node-expected-auralinux.txt new file mode 100644 index 00000000000000..70b8857d79b869 --- /dev/null +++ b/content/test/data/accessibility/mathml/mtable-node-expected-auralinux.txt @@ -0,0 +1 @@ +[table] tag:mtable diff --git a/content/test/data/accessibility/mathml/mtable-node-expected-blink.txt b/content/test/data/accessibility/mathml/mtable-node-expected-blink.txt new file mode 100644 index 00000000000000..a0b8909bf78688 --- /dev/null +++ b/content/test/data/accessibility/mathml/mtable-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLTable diff --git a/content/test/data/accessibility/mathml/mtable-node-expected-mac.txt b/content/test/data/accessibility/mathml/mtable-node-expected-mac.txt new file mode 100644 index 00000000000000..61e9e6d30f9fc2 --- /dev/null +++ b/content/test/data/accessibility/mathml/mtable-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathTable diff --git a/content/test/data/accessibility/mathml/mtable.html b/content/test/data/accessibility/mathml/mtable.html new file mode 100644 index 00000000000000..330f8107c3d2ba --- /dev/null +++ b/content/test/data/accessibility/mathml/mtable.html @@ -0,0 +1,19 @@ + + + + + + 1 + 2 + 3 + + + 4 + 5 + 6 + + + diff --git a/content/test/data/accessibility/mathml/mtd-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/mtd-node-expected-auralinux.txt new file mode 100644 index 00000000000000..e275a760144dfd --- /dev/null +++ b/content/test/data/accessibility/mathml/mtd-node-expected-auralinux.txt @@ -0,0 +1 @@ +[table cell] tag:mtd (row=-1, col=-1, row_span=1, col_span=1, n_row_headers=0, n_col_headers=0) diff --git a/content/test/data/accessibility/mathml/mtd-node-expected-blink.txt b/content/test/data/accessibility/mathml/mtd-node-expected-blink.txt new file mode 100644 index 00000000000000..1739c781e696cc --- /dev/null +++ b/content/test/data/accessibility/mathml/mtd-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLTableCell diff --git a/content/test/data/accessibility/mathml/mtd-node-expected-mac.txt b/content/test/data/accessibility/mathml/mtd-node-expected-mac.txt new file mode 100644 index 00000000000000..f52e09951086ad --- /dev/null +++ b/content/test/data/accessibility/mathml/mtd-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathTableCell diff --git a/content/test/data/accessibility/mathml/mtd.html b/content/test/data/accessibility/mathml/mtd.html new file mode 100644 index 00000000000000..8449b5748170d9 --- /dev/null +++ b/content/test/data/accessibility/mathml/mtd.html @@ -0,0 +1,19 @@ + + + + + + 1 + 2 + 3 + + + 4 + 5 + 6 + + + diff --git a/content/test/data/accessibility/mathml/mtext-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/mtext-node-expected-auralinux.txt new file mode 100644 index 00000000000000..f2a1fe68af9c64 --- /dev/null +++ b/content/test/data/accessibility/mathml/mtext-node-expected-auralinux.txt @@ -0,0 +1 @@ +[static] tag:mtext diff --git a/content/test/data/accessibility/mathml/mtext-node-expected-blink.txt b/content/test/data/accessibility/mathml/mtext-node-expected-blink.txt new file mode 100644 index 00000000000000..32fea288998478 --- /dev/null +++ b/content/test/data/accessibility/mathml/mtext-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLText diff --git a/content/test/data/accessibility/mathml/mtext-node-expected-mac.txt b/content/test/data/accessibility/mathml/mtext-node-expected-mac.txt new file mode 100644 index 00000000000000..dc05c5c057b53d --- /dev/null +++ b/content/test/data/accessibility/mathml/mtext-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathText diff --git a/content/test/data/accessibility/mathml/mtext.html b/content/test/data/accessibility/mathml/mtext.html new file mode 100644 index 00000000000000..677c2587e62a1c --- /dev/null +++ b/content/test/data/accessibility/mathml/mtext.html @@ -0,0 +1,8 @@ + + + + otherwise + diff --git a/content/test/data/accessibility/mathml/mtr-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/mtr-node-expected-auralinux.txt new file mode 100644 index 00000000000000..172815ef47303a --- /dev/null +++ b/content/test/data/accessibility/mathml/mtr-node-expected-auralinux.txt @@ -0,0 +1 @@ +[table row] tag:mtr diff --git a/content/test/data/accessibility/mathml/mtr-node-expected-blink.txt b/content/test/data/accessibility/mathml/mtr-node-expected-blink.txt new file mode 100644 index 00000000000000..57b946ee13576e --- /dev/null +++ b/content/test/data/accessibility/mathml/mtr-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLTableRow diff --git a/content/test/data/accessibility/mathml/mtr-node-expected-mac.txt b/content/test/data/accessibility/mathml/mtr-node-expected-mac.txt new file mode 100644 index 00000000000000..e3d7da29ed12ea --- /dev/null +++ b/content/test/data/accessibility/mathml/mtr-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathTableRow diff --git a/content/test/data/accessibility/mathml/mtr.html b/content/test/data/accessibility/mathml/mtr.html new file mode 100644 index 00000000000000..66f21a5177a6eb --- /dev/null +++ b/content/test/data/accessibility/mathml/mtr.html @@ -0,0 +1,19 @@ + + + + + + 1 + 2 + 3 + + + 4 + 5 + 6 + + + diff --git a/content/test/data/accessibility/mathml/munder-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/munder-node-expected-auralinux.txt new file mode 100644 index 00000000000000..9387531e651a7a --- /dev/null +++ b/content/test/data/accessibility/mathml/munder-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:munder diff --git a/content/test/data/accessibility/mathml/munder-node-expected-blink.txt b/content/test/data/accessibility/mathml/munder-node-expected-blink.txt new file mode 100644 index 00000000000000..150d220d7e90bb --- /dev/null +++ b/content/test/data/accessibility/mathml/munder-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLUnder diff --git a/content/test/data/accessibility/mathml/munder-node-expected-mac.txt b/content/test/data/accessibility/mathml/munder-node-expected-mac.txt new file mode 100644 index 00000000000000..0e40b2989ab67e --- /dev/null +++ b/content/test/data/accessibility/mathml/munder-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathUnderOver diff --git a/content/test/data/accessibility/mathml/munder.html b/content/test/data/accessibility/mathml/munder.html new file mode 100644 index 00000000000000..462a494efe9d97 --- /dev/null +++ b/content/test/data/accessibility/mathml/munder.html @@ -0,0 +1,11 @@ + + + + + 1 + 2 + + diff --git a/content/test/data/accessibility/mathml/munderover-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/munderover-node-expected-auralinux.txt new file mode 100644 index 00000000000000..ec7e57fc6d7ea8 --- /dev/null +++ b/content/test/data/accessibility/mathml/munderover-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:munderover diff --git a/content/test/data/accessibility/mathml/munderover-node-expected-blink.txt b/content/test/data/accessibility/mathml/munderover-node-expected-blink.txt new file mode 100644 index 00000000000000..6e563b75a42ac7 --- /dev/null +++ b/content/test/data/accessibility/mathml/munderover-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLUnderOver diff --git a/content/test/data/accessibility/mathml/munderover-node-expected-mac.txt b/content/test/data/accessibility/mathml/munderover-node-expected-mac.txt new file mode 100644 index 00000000000000..0e40b2989ab67e --- /dev/null +++ b/content/test/data/accessibility/mathml/munderover-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathUnderOver diff --git a/content/test/data/accessibility/mathml/munderover.html b/content/test/data/accessibility/mathml/munderover.html new file mode 100644 index 00000000000000..457f004732776c --- /dev/null +++ b/content/test/data/accessibility/mathml/munderover.html @@ -0,0 +1,12 @@ + + + + + 1 + 2 + 3 + + diff --git a/content/test/data/accessibility/mathml/none-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/none-node-expected-auralinux.txt new file mode 100644 index 00000000000000..1790c1198cd6d2 --- /dev/null +++ b/content/test/data/accessibility/mathml/none-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:none diff --git a/content/test/data/accessibility/mathml/none-node-expected-blink.txt b/content/test/data/accessibility/mathml/none-node-expected-blink.txt new file mode 100644 index 00000000000000..77840c2b962eba --- /dev/null +++ b/content/test/data/accessibility/mathml/none-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLNoneScript diff --git a/content/test/data/accessibility/mathml/none-node-expected-mac.txt b/content/test/data/accessibility/mathml/none-node-expected-mac.txt new file mode 100644 index 00000000000000..211af9ce471da9 --- /dev/null +++ b/content/test/data/accessibility/mathml/none-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathRow diff --git a/content/test/data/accessibility/mathml/none.html b/content/test/data/accessibility/mathml/none.html new file mode 100644 index 00000000000000..bf39714fbd286d --- /dev/null +++ b/content/test/data/accessibility/mathml/none.html @@ -0,0 +1,19 @@ + + + + + 1 + 2 + 3 + + 5 + + 6 + + 8 + 9 + + diff --git a/content/test/data/accessibility/mathml/semantics-node-expected-auralinux.txt b/content/test/data/accessibility/mathml/semantics-node-expected-auralinux.txt new file mode 100644 index 00000000000000..1c8b46876bc091 --- /dev/null +++ b/content/test/data/accessibility/mathml/semantics-node-expected-auralinux.txt @@ -0,0 +1 @@ +[section] tag:semantics diff --git a/content/test/data/accessibility/mathml/semantics-node-expected-blink.txt b/content/test/data/accessibility/mathml/semantics-node-expected-blink.txt new file mode 100644 index 00000000000000..985cbc43ca5dda --- /dev/null +++ b/content/test/data/accessibility/mathml/semantics-node-expected-blink.txt @@ -0,0 +1 @@ +mathMLRow diff --git a/content/test/data/accessibility/mathml/semantics-node-expected-mac.txt b/content/test/data/accessibility/mathml/semantics-node-expected-mac.txt new file mode 100644 index 00000000000000..211af9ce471da9 --- /dev/null +++ b/content/test/data/accessibility/mathml/semantics-node-expected-mac.txt @@ -0,0 +1 @@ +AXGroup AXSubrole=AXMathRow diff --git a/content/test/data/accessibility/mathml/semantics.html b/content/test/data/accessibility/mathml/semantics.html new file mode 100644 index 00000000000000..1233733241d313 --- /dev/null +++ b/content/test/data/accessibility/mathml/semantics.html @@ -0,0 +1,18 @@ + + + + + 12 + \frac{1}{2} + + + + 1 + 2 + + + + diff --git a/extensions/common/api/automation.idl b/extensions/common/api/automation.idl index 80d91a96e46bfd..7dc97a06bb7168 100644 --- a/extensions/common/api/automation.idl +++ b/extensions/common/api/automation.idl @@ -267,7 +267,28 @@ mark, marquee, math, + mathMLFraction, + mathMLIdentifier, mathMLMath, + mathMLMultiscripts, + mathMLNoneScript, + mathMLNumber, + mathMLOperator, + mathMLOver, + mathMLPrescriptDelimiter, + mathMLRoot, + mathMLRow, + mathMLSquareRoot, + mathMLStringLiteral, + mathMLSub, + mathMLSubSup, + mathMLSup, + mathMLTable, + mathMLTableCell, + mathMLTableRow, + mathMLText, + mathMLUnder, + mathMLUnderOver, menu, menuBar, menuItem, diff --git a/third_party/blink/renderer/core/mathml/mathml_tag_names.json5 b/third_party/blink/renderer/core/mathml/mathml_tag_names.json5 index 0cda392e4422d0..5fa80b654bc21a 100644 --- a/third_party/blink/renderer/core/mathml/mathml_tag_names.json5 +++ b/third_party/blink/renderer/core/mathml/mathml_tag_names.json5 @@ -107,6 +107,14 @@ name: "mtable", interfaceName: "MathMLElement", }, + { + name: "mtd", + interfaceName: "MathMLElement", + }, + { + name: "mtr", + interfaceName: "MathMLElement", + }, { name: "mtext", interfaceName: "MathMLElement", diff --git a/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc b/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc index 0c9e7fa4b5f605..3e981fa7dbd2df 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc @@ -81,6 +81,7 @@ #include "third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h" #include "third_party/blink/renderer/core/layout/ng/list/layout_ng_list_item.h" #include "third_party/blink/renderer/core/loader/progress_tracker.h" +#include "third_party/blink/renderer/core/mathml/mathml_element.h" #include "third_party/blink/renderer/core/page/page.h" #include "third_party/blink/renderer/core/paint/paint_layer.h" #include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h" diff --git a/third_party/blink/renderer/modules/accessibility/ax_node_object.cc b/third_party/blink/renderer/modules/accessibility/ax_node_object.cc index 18008a34c440d5..647cfd8bf9b2af 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_node_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_node_object.cc @@ -577,6 +577,14 @@ AXObjectInclusion AXNodeObject::ShouldIncludeBasedOnSemantics( always_included_computed_roles.end()) return kIncludeObject; + // Don't ignore MathML nodes by default, since MathML relies on child + // positions to determine semantics (e.g. numerator is the first child of a + // fraction). + if (RuntimeEnabledFeatures::MathMLCoreEnabled() && IsA(node) && + RoleValue() != ax::mojom::blink::Role::kNone) { + return kIncludeObject; + } + // Using the title or accessibility description (so we // check if there's some kind of accessible name for the element) // to decide an element's visibility is not as definitive as @@ -1073,9 +1081,60 @@ ax::mojom::blink::Role AXNodeObject::NativeRoleIgnoringAria() const { ? ax::mojom::blink::Role::kMathMLMath : ax::mojom::blink::Role::kMath; } - // TODO(crbug.com/6606): Map more MathML elements. + if (element->HasTagName(mathml_names::kMfracTag)) + return ax::mojom::blink::Role::kMathMLFraction; + if (element->HasTagName(mathml_names::kMiTag)) + return ax::mojom::blink::Role::kMathMLIdentifier; + if (element->HasTagName(mathml_names::kMmultiscriptsTag)) + return ax::mojom::blink::Role::kMathMLMultiscripts; + if (element->HasTagName(mathml_names::kMnTag)) + return ax::mojom::blink::Role::kMathMLNumber; + if (element->HasTagName(mathml_names::kMoTag)) + return ax::mojom::blink::Role::kMathMLOperator; + if (element->HasTagName(mathml_names::kMoverTag)) + return ax::mojom::blink::Role::kMathMLOver; + if (element->HasTagName(mathml_names::kMunderTag)) + return ax::mojom::blink::Role::kMathMLUnder; + if (element->HasTagName(mathml_names::kMunderoverTag)) + return ax::mojom::blink::Role::kMathMLUnderOver; + if (element->HasTagName(mathml_names::kMrootTag)) + return ax::mojom::blink::Role::kMathMLRoot; + if (element->HasTagName(mathml_names::kMrowTag) || + element->HasTagName(mathml_names::kAnnotationXmlTag) || + element->HasTagName(mathml_names::kMactionTag) || + element->HasTagName(mathml_names::kMerrorTag) || + element->HasTagName(mathml_names::kMpaddedTag) || + element->HasTagName(mathml_names::kMphantomTag) || + element->HasTagName(mathml_names::kMstyleTag) || + element->HasTagName(mathml_names::kSemanticsTag)) { + return ax::mojom::blink::Role::kMathMLRow; + } + if (element->HasTagName(mathml_names::kMprescriptsTag)) + return ax::mojom::blink::Role::kMathMLPrescriptDelimiter; + if (element->HasTagName(mathml_names::kNoneTag)) + return ax::mojom::blink::Role::kMathMLNoneScript; + if (element->HasTagName(mathml_names::kMsqrtTag)) + return ax::mojom::blink::Role::kMathMLSquareRoot; + if (element->HasTagName(mathml_names::kMsTag)) + return ax::mojom::blink::Role::kMathMLStringLiteral; if (element->HasTagName(mathml_names::kMspaceTag)) return ax::mojom::blink::Role::kNone; + if (element->HasTagName(mathml_names::kMsubTag)) + return ax::mojom::blink::Role::kMathMLSub; + if (element->HasTagName(mathml_names::kMsubsupTag)) + return ax::mojom::blink::Role::kMathMLSubSup; + if (element->HasTagName(mathml_names::kMsupTag)) + return ax::mojom::blink::Role::kMathMLSup; + if (element->HasTagName(mathml_names::kMtableTag)) + return ax::mojom::blink::Role::kMathMLTable; + if (element->HasTagName(mathml_names::kMtdTag)) + return ax::mojom::blink::Role::kMathMLTableCell; + if (element->HasTagName(mathml_names::kMtrTag)) + return ax::mojom::blink::Role::kMathMLTableRow; + if (element->HasTagName(mathml_names::kMtextTag) || + element->HasTagName(mathml_names::kAnnotationTag)) { + return ax::mojom::blink::Role::kMathMLText; + } } if (GetNode()->HasTagName(html_names::kRpTag) || diff --git a/third_party/blink/renderer/modules/accessibility/ax_object.cc b/third_party/blink/renderer/modules/accessibility/ax_object.cc index d8b67476d08085..10e0bd3ae9b1a8 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_object.cc @@ -5640,7 +5640,28 @@ bool AXObject::SupportsNameFromContents(bool recursive) const { case ax::mojom::blink::Role::kLog: case ax::mojom::blink::Role::kMain: case ax::mojom::blink::Role::kMarquee: + case ax::mojom::blink::Role::kMathMLFraction: + case ax::mojom::blink::Role::kMathMLIdentifier: case ax::mojom::blink::Role::kMathMLMath: + case ax::mojom::blink::Role::kMathMLMultiscripts: + case ax::mojom::blink::Role::kMathMLNoneScript: + case ax::mojom::blink::Role::kMathMLNumber: + case ax::mojom::blink::Role::kMathMLOperator: + case ax::mojom::blink::Role::kMathMLOver: + case ax::mojom::blink::Role::kMathMLPrescriptDelimiter: + case ax::mojom::blink::Role::kMathMLRoot: + case ax::mojom::blink::Role::kMathMLRow: + case ax::mojom::blink::Role::kMathMLSquareRoot: + case ax::mojom::blink::Role::kMathMLStringLiteral: + case ax::mojom::blink::Role::kMathMLSub: + case ax::mojom::blink::Role::kMathMLSubSup: + case ax::mojom::blink::Role::kMathMLSup: + case ax::mojom::blink::Role::kMathMLTable: + case ax::mojom::blink::Role::kMathMLTableCell: + case ax::mojom::blink::Role::kMathMLTableRow: + case ax::mojom::blink::Role::kMathMLText: + case ax::mojom::blink::Role::kMathMLUnder: + case ax::mojom::blink::Role::kMathMLUnderOver: case ax::mojom::blink::Role::kMenuListPopup: case ax::mojom::blink::Role::kMenu: case ax::mojom::blink::Role::kMenuBar: diff --git a/third_party/blink/web_tests/accessibility/element-role-mapping-normal-expected.txt b/third_party/blink/web_tests/accessibility/element-role-mapping-normal-expected.txt index c7babf96f54745..3982ca95040e34 100644 --- a/third_party/blink/web_tests/accessibility/element-role-mapping-normal-expected.txt +++ b/third_party/blink/web_tests/accessibility/element-role-mapping-normal-expected.txt @@ -87,40 +87,40 @@ AXRole: AXGenericContainer AXRole: AXDescriptionListDetail AXRole: AXStaticText "- white cold drink" AXRole: AXInlineTextBox "- white cold drink" - AXRole: AXMath "x + a / b" - AXRole: AXGenericContainer - AXRole: AXGenericContainer + AXRole: AXMath + AXRole: AXMathMLRow + AXRole: AXMathMLIdentifier AXRole: AXStaticText "x" AXRole: AXInlineTextBox "x" - AXRole: AXGenericContainer + AXRole: AXMathMLOperator AXRole: AXStaticText "+" AXRole: AXInlineTextBox "+" - AXRole: AXGenericContainer - AXRole: AXGenericContainer + AXRole: AXMathMLRow + AXRole: AXMathMLIdentifier AXRole: AXStaticText "a" AXRole: AXInlineTextBox "a" - AXRole: AXGenericContainer + AXRole: AXMathMLOperator AXRole: AXStaticText "/" AXRole: AXInlineTextBox "/" - AXRole: AXGenericContainer + AXRole: AXMathMLIdentifier AXRole: AXStaticText "b" AXRole: AXInlineTextBox "b" AXRole: AXMathMLMath - AXRole: AXGenericContainer - AXRole: AXGenericContainer + AXRole: AXMathMLRow + AXRole: AXMathMLIdentifier AXRole: AXStaticText "π‘₯" AXRole: AXInlineTextBox "π‘₯" - AXRole: AXGenericContainer + AXRole: AXMathMLOperator AXRole: AXStaticText "+" AXRole: AXInlineTextBox "+" - AXRole: AXGenericContainer - AXRole: AXGenericContainer + AXRole: AXMathMLRow + AXRole: AXMathMLIdentifier AXRole: AXStaticText "π‘Ž" AXRole: AXInlineTextBox "π‘Ž" - AXRole: AXGenericContainer + AXRole: AXMathMLOperator AXRole: AXStaticText "/" AXRole: AXInlineTextBox "/" - AXRole: AXGenericContainer + AXRole: AXMathMLIdentifier AXRole: AXStaticText "𝑏" AXRole: AXInlineTextBox "𝑏" AXRole: AXMain diff --git a/third_party/closure_compiler/externs/automation.js b/third_party/closure_compiler/externs/automation.js index 15dbafc5cbbefc..552e4333428dbc 100644 --- a/third_party/closure_compiler/externs/automation.js +++ b/third_party/closure_compiler/externs/automation.js @@ -266,7 +266,28 @@ chrome.automation.RoleType = { MARK: 'mark', MARQUEE: 'marquee', MATH: 'math', + MATH_MLFRACTION: 'mathMLFraction', + MATH_MLIDENTIFIER: 'mathMLIdentifier', MATH_MLMATH: 'mathMLMath', + MATH_MLMULTISCRIPTS: 'mathMLMultiscripts', + MATH_MLNUMBER: 'mathMLNumber', + MATH_MLOPERATOR: 'mathMLOperator', + MATH_MLOVER: 'mathMLOver', + MATH_MLROOT: 'mathMLRoot', + MATH_MLROW: 'mathMLRow', + MATH_MLSQUARE_ROOT: 'mathMLSquareRoot', + MATH_MLSTRING_LITERAL: 'mathMLStringLiteral', + MATH_MLSUB: 'mathMLSub', + MATH_MLSUB_SUP: 'mathMLSubSup', + MATH_MLSUP: 'mathMLSup', + MATH_MLTABLE: 'mathMLTable', + MATH_MLTABLE_CELL: 'mathMLTableCell', + MATH_MLTABLE_ROW: 'mathMLTableRow', + MATH_MLTEXT: 'mathMLText', + MATH_MLUNDER: 'mathMLUnder', + MATH_MLUNDER_OVER: 'mathMLUnderOver', + MATH_MLPRESCRIPT_DELIMITER: 'mathMLPrescriptDelimiter', + MATH_MLNONE_SCRIPT: 'mathMLNoneScript', MENU: 'menu', MENU_BAR: 'menuBar', MENU_ITEM: 'menuItem', diff --git a/ui/accessibility/ax_enum_util.cc b/ui/accessibility/ax_enum_util.cc index 2ae37af1fa991b..740df04e883c42 100644 --- a/ui/accessibility/ax_enum_util.cc +++ b/ui/accessibility/ax_enum_util.cc @@ -382,8 +382,50 @@ const char* ToString(ax::mojom::Role role) { return "marquee"; case ax::mojom::Role::kMath: return "math"; + case ax::mojom::Role::kMathMLFraction: + return "mathMLFraction"; + case ax::mojom::Role::kMathMLIdentifier: + return "mathMLIdentifier"; case ax::mojom::Role::kMathMLMath: return "mathMLMath"; + case ax::mojom::Role::kMathMLMultiscripts: + return "mathMLMultiscripts"; + case ax::mojom::Role::kMathMLNoneScript: + return "mathMLNoneScript"; + case ax::mojom::Role::kMathMLNumber: + return "mathMLNumber"; + case ax::mojom::Role::kMathMLOperator: + return "mathMLOperator"; + case ax::mojom::Role::kMathMLOver: + return "mathMLOver"; + case ax::mojom::Role::kMathMLPrescriptDelimiter: + return "mathMLPrescriptDelimiter"; + case ax::mojom::Role::kMathMLRoot: + return "mathMLRoot"; + case ax::mojom::Role::kMathMLRow: + return "mathMLRow"; + case ax::mojom::Role::kMathMLSquareRoot: + return "mathMLSquareRoot"; + case ax::mojom::Role::kMathMLStringLiteral: + return "mathMLStringLiteral"; + case ax::mojom::Role::kMathMLSub: + return "mathMLSub"; + case ax::mojom::Role::kMathMLSubSup: + return "mathMLSubSup"; + case ax::mojom::Role::kMathMLSup: + return "mathMLSup"; + case ax::mojom::Role::kMathMLTable: + return "mathMLTable"; + case ax::mojom::Role::kMathMLTableCell: + return "mathMLTableCell"; + case ax::mojom::Role::kMathMLTableRow: + return "mathMLTableRow"; + case ax::mojom::Role::kMathMLText: + return "mathMLText"; + case ax::mojom::Role::kMathMLUnder: + return "mathMLUnder"; + case ax::mojom::Role::kMathMLUnderOver: + return "mathMLUnderOver"; case ax::mojom::Role::kMenu: return "menu"; case ax::mojom::Role::kMenuBar: diff --git a/ui/accessibility/ax_enums.mojom b/ui/accessibility/ax_enums.mojom index aca7861b8475f4..f8f994048f4ce2 100644 --- a/ui/accessibility/ax_enums.mojom +++ b/ui/accessibility/ax_enums.mojom @@ -106,8 +106,8 @@ enum Event { // Web: this attribute is only used in web content. // // Native: this attribute is only used in native UI. -// Next version: 3 -// Next value: 188 +// Next version: 4 +// Next value: 209 [Extensible, Stable, Uuid="d258eb73-e0cc-490c-b881-80ee11d3fec2"] enum Role { // Used for role="none"/"presentation" -- ignored in platform tree. @@ -246,7 +246,30 @@ enum Role { kMark = 119, kMarquee = 120, kMath = 121, + // MathML roles + // https://w3c.github.io/mathml-aam + [MinVersion=3] kMathMLFraction = 188, + [MinVersion=3] kMathMLIdentifier = 189, [MinVersion=2] kMathMLMath = 187, + [MinVersion=3] kMathMLMultiscripts = 190, + [MinVersion=3] kMathMLNoneScript = 191, + [MinVersion=3] kMathMLNumber = 192, + [MinVersion=3] kMathMLOperator = 193, + [MinVersion=3] kMathMLOver = 194, + [MinVersion=3] kMathMLPrescriptDelimiter = 195, + [MinVersion=3] kMathMLRoot = 196, + [MinVersion=3] kMathMLRow = 197, + [MinVersion=3] kMathMLSquareRoot = 198, + [MinVersion=3] kMathMLStringLiteral = 199, + [MinVersion=3] kMathMLSub = 200, + [MinVersion=3] kMathMLSubSup = 201, + [MinVersion=3] kMathMLSup = 202, + [MinVersion=3] kMathMLTable = 203, + [MinVersion=3] kMathMLTableCell = 204, + [MinVersion=3] kMathMLTableRow = 205, + [MinVersion=3] kMathMLText = 206, + [MinVersion=3] kMathMLUnder = 207, + [MinVersion=3] kMathMLUnderOver = 208, kMenu = 122, kMenuBar = 123, kMenuItem = 124, diff --git a/ui/accessibility/ax_role_properties.cc b/ui/accessibility/ax_role_properties.cc index c8e6b999ff16d7..de5ec9a306fc8a 100644 --- a/ui/accessibility/ax_role_properties.cc +++ b/ui/accessibility/ax_role_properties.cc @@ -93,6 +93,7 @@ bool IsCellOrTableHeader(const ax::mojom::Role role) { switch (role) { case ax::mojom::Role::kCell: case ax::mojom::Role::kColumnHeader: + case ax::mojom::Role::kMathMLTableCell: case ax::mojom::Role::kRowHeader: return true; case ax::mojom::Role::kLayoutTableCell: @@ -515,8 +516,9 @@ bool IsReadOnlySupported(const ax::mojom::Role role) { // Therefore, [...] user agents SHOULD NOT expose either property to // assistive technologies unless the columnheader descends from a grid. case ax::mojom::Role::kCell: - case ax::mojom::Role::kRowHeader: case ax::mojom::Role::kColumnHeader: + case ax::mojom::Role::kMathMLTableCell: + case ax::mojom::Role::kRowHeader: return false; default: return false; @@ -573,6 +575,7 @@ bool IsSection(const ax::mojom::Role role) { case ax::mojom::Role::kMarquee: case ax::mojom::Role::kMath: case ax::mojom::Role::kMathMLMath: + case ax::mojom::Role::kMathMLTableCell: case ax::mojom::Role::kNote: case ax::mojom::Role::kProgressIndicator: // Subclass of kStatus. case ax::mojom::Role::kRow: // Subclass of kGroup. @@ -648,6 +651,7 @@ bool IsSelectSupported(const ax::mojom::Role role) { case ax::mojom::Role::kCell: case ax::mojom::Role::kColumnHeader: case ax::mojom::Role::kListBoxOption: + case ax::mojom::Role::kMathMLTableCell: case ax::mojom::Role::kMenuListOption: case ax::mojom::Role::kRow: case ax::mojom::Role::kRowHeader: diff --git a/ui/accessibility/platform/ax_platform_node_auralinux.cc b/ui/accessibility/platform/ax_platform_node_auralinux.cc index a0f7ab76e5070f..aaecd575360a72 100644 --- a/ui/accessibility/platform/ax_platform_node_auralinux.cc +++ b/ui/accessibility/platform/ax_platform_node_auralinux.cc @@ -2853,6 +2853,49 @@ AtkRole AXPlatformNodeAuraLinux::GetAtkRole() const { case ax::mojom::Role::kMath: case ax::mojom::Role::kMathMLMath: return ATK_ROLE_MATH; + // https://w3c.github.io/mathml-aam/#mathml-element-mappings + case ax::mojom::Role::kMathMLFraction: + return ATK_ROLE_MATH_FRACTION; + case ax::mojom::Role::kMathMLIdentifier: + return ATK_ROLE_STATIC; + case ax::mojom::Role::kMathMLMultiscripts: + return ATK_ROLE_SECTION; + case ax::mojom::Role::kMathMLNoneScript: + return ATK_ROLE_SECTION; + case ax::mojom::Role::kMathMLNumber: + return ATK_ROLE_STATIC; + case ax::mojom::Role::kMathMLPrescriptDelimiter: + return ATK_ROLE_SECTION; + case ax::mojom::Role::kMathMLOperator: + return ATK_ROLE_STATIC; + case ax::mojom::Role::kMathMLOver: + return ATK_ROLE_SECTION; + case ax::mojom::Role::kMathMLRoot: + return ATK_ROLE_MATH_ROOT; + case ax::mojom::Role::kMathMLRow: + return ATK_ROLE_SECTION; + case ax::mojom::Role::kMathMLSquareRoot: + return ATK_ROLE_MATH_ROOT; + case ax::mojom::Role::kMathMLStringLiteral: + return ATK_ROLE_STATIC; + case ax::mojom::Role::kMathMLSub: + return ATK_ROLE_SECTION; + case ax::mojom::Role::kMathMLSubSup: + return ATK_ROLE_SECTION; + case ax::mojom::Role::kMathMLSup: + return ATK_ROLE_SECTION; + case ax::mojom::Role::kMathMLTable: + return ATK_ROLE_TABLE; + case ax::mojom::Role::kMathMLTableCell: + return ATK_ROLE_TABLE_CELL; + case ax::mojom::Role::kMathMLTableRow: + return ATK_ROLE_TABLE_ROW; + case ax::mojom::Role::kMathMLText: + return ATK_ROLE_STATIC; + case ax::mojom::Role::kMathMLUnder: + return ATK_ROLE_SECTION; + case ax::mojom::Role::kMathMLUnderOver: + return ATK_ROLE_SECTION; case ax::mojom::Role::kMarquee: return ATK_ROLE_MARQUEE; case ax::mojom::Role::kMenu: diff --git a/ui/accessibility/platform/ax_platform_node_cocoa.mm b/ui/accessibility/platform/ax_platform_node_cocoa.mm index 5a4d6670232080..f0b2527e167e07 100644 --- a/ui/accessibility/platform/ax_platform_node_cocoa.mm +++ b/ui/accessibility/platform/ax_platform_node_cocoa.mm @@ -165,8 +165,30 @@ RoleMap BuildRoleMap() { {ax::mojom::Role::kMain, NSAccessibilityGroupRole}, {ax::mojom::Role::kMark, NSAccessibilityGroupRole}, {ax::mojom::Role::kMarquee, NSAccessibilityGroupRole}, + // https://w3c.github.io/mathml-aam/#mathml-element-mappings {ax::mojom::Role::kMath, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLFraction, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLIdentifier, NSAccessibilityGroupRole}, {ax::mojom::Role::kMathMLMath, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLMultiscripts, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLNoneScript, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLNumber, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLOperator, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLOver, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLPrescriptDelimiter, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLRoot, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLRow, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLSquareRoot, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLStringLiteral, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLSub, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLSubSup, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLSup, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLTable, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLTableCell, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLTableRow, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLText, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLUnder, NSAccessibilityGroupRole}, + {ax::mojom::Role::kMathMLUnderOver, NSAccessibilityGroupRole}, {ax::mojom::Role::kMenu, NSAccessibilityMenuRole}, {ax::mojom::Role::kMenuBar, NSAccessibilityMenuBarRole}, {ax::mojom::Role::kMenuItem, NSAccessibilityMenuItemRole}, @@ -266,8 +288,29 @@ RoleMap BuildSubroleMap() { {ax::mojom::Role::kLog, @"AXApplicationLog"}, {ax::mojom::Role::kMain, @"AXLandmarkMain"}, {ax::mojom::Role::kMarquee, @"AXApplicationMarquee"}, + // https://w3c.github.io/mathml-aam/#mathml-element-mappings {ax::mojom::Role::kMath, @"AXDocumentMath"}, + {ax::mojom::Role::kMathMLFraction, @"AXMathFraction"}, + {ax::mojom::Role::kMathMLIdentifier, @"AXMathIdentifier"}, {ax::mojom::Role::kMathMLMath, @"AXDocumentMath"}, + {ax::mojom::Role::kMathMLMultiscripts, @"AXMathMultiscript"}, + {ax::mojom::Role::kMathMLNoneScript, @"AXMathRow"}, + {ax::mojom::Role::kMathMLNumber, @"AXMathNumber"}, + {ax::mojom::Role::kMathMLOperator, @"AXMathOperator"}, + {ax::mojom::Role::kMathMLOver, @"AXMathUnderOver"}, + {ax::mojom::Role::kMathMLPrescriptDelimiter, @"AXMathRow"}, + {ax::mojom::Role::kMathMLRoot, @"AXMathRoot"}, + {ax::mojom::Role::kMathMLRow, @"AXMathRow"}, + {ax::mojom::Role::kMathMLSquareRoot, @"AXMathSquareRoot"}, + {ax::mojom::Role::kMathMLSub, @"AXMathSubscriptSuperscript"}, + {ax::mojom::Role::kMathMLSubSup, @"AXMathSubscriptSuperscript"}, + {ax::mojom::Role::kMathMLSup, @"AXMathSubscriptSuperscript"}, + {ax::mojom::Role::kMathMLTable, @"AXMathTable"}, + {ax::mojom::Role::kMathMLTableCell, @"AXMathTableCell"}, + {ax::mojom::Role::kMathMLTableRow, @"AXMathTableRow"}, + {ax::mojom::Role::kMathMLText, @"AXMathText"}, + {ax::mojom::Role::kMathMLUnder, @"AXMathUnderOver"}, + {ax::mojom::Role::kMathMLUnderOver, @"AXMathUnderOver"}, {ax::mojom::Role::kNavigation, @"AXLandmarkNavigation"}, {ax::mojom::Role::kNote, @"AXDocumentNote"}, {ax::mojom::Role::kRegion, @"AXLandmarkRegion"}, diff --git a/ui/accessibility/platform/ax_platform_node_win.cc b/ui/accessibility/platform/ax_platform_node_win.cc index 704dcc85787e0e..7b265843b2324f 100644 --- a/ui/accessibility/platform/ax_platform_node_win.cc +++ b/ui/accessibility/platform/ax_platform_node_win.cc @@ -5540,6 +5540,31 @@ int AXPlatformNodeWin::MSAARole() { case ax::mojom::Role::kMathMLMath: return ROLE_SYSTEM_EQUATION; + // TODO(http://crbug.com/1260584): Refine this if/when a MSAA API exists for + // properly exposing MathML content. + case ax::mojom::Role::kMathMLFraction: + case ax::mojom::Role::kMathMLIdentifier: + case ax::mojom::Role::kMathMLMultiscripts: + case ax::mojom::Role::kMathMLNoneScript: + case ax::mojom::Role::kMathMLNumber: + case ax::mojom::Role::kMathMLOperator: + case ax::mojom::Role::kMathMLOver: + case ax::mojom::Role::kMathMLPrescriptDelimiter: + case ax::mojom::Role::kMathMLRoot: + case ax::mojom::Role::kMathMLRow: + case ax::mojom::Role::kMathMLSquareRoot: + case ax::mojom::Role::kMathMLStringLiteral: + case ax::mojom::Role::kMathMLSub: + case ax::mojom::Role::kMathMLSubSup: + case ax::mojom::Role::kMathMLSup: + case ax::mojom::Role::kMathMLTable: + case ax::mojom::Role::kMathMLTableCell: + case ax::mojom::Role::kMathMLTableRow: + case ax::mojom::Role::kMathMLText: + case ax::mojom::Role::kMathMLUnder: + case ax::mojom::Role::kMathMLUnderOver: + return ROLE_SYSTEM_GROUPING; + case ax::mojom::Role::kMenu: return ROLE_SYSTEM_MENUPOPUP; @@ -6371,6 +6396,31 @@ std::wstring AXPlatformNodeWin::UIAAriaRole() { case ax::mojom::Role::kMathMLMath: return L"group"; + // TODO(http://crbug.com/1260585): Refine this if/when a UIA API exists for + // properly exposing MathML content. + case ax::mojom::Role::kMathMLFraction: + case ax::mojom::Role::kMathMLIdentifier: + case ax::mojom::Role::kMathMLMultiscripts: + case ax::mojom::Role::kMathMLNoneScript: + case ax::mojom::Role::kMathMLNumber: + case ax::mojom::Role::kMathMLOperator: + case ax::mojom::Role::kMathMLOver: + case ax::mojom::Role::kMathMLPrescriptDelimiter: + case ax::mojom::Role::kMathMLRoot: + case ax::mojom::Role::kMathMLRow: + case ax::mojom::Role::kMathMLSquareRoot: + case ax::mojom::Role::kMathMLStringLiteral: + case ax::mojom::Role::kMathMLSub: + case ax::mojom::Role::kMathMLSubSup: + case ax::mojom::Role::kMathMLSup: + case ax::mojom::Role::kMathMLTable: + case ax::mojom::Role::kMathMLTableCell: + case ax::mojom::Role::kMathMLTableRow: + case ax::mojom::Role::kMathMLText: + case ax::mojom::Role::kMathMLUnder: + case ax::mojom::Role::kMathMLUnderOver: + return L"group"; + case ax::mojom::Role::kMenu: return L"menu"; @@ -7035,6 +7085,31 @@ LONG AXPlatformNodeWin::ComputeUIAControlType() { // NOLINT(runtime/int) case ax::mojom::Role::kMathMLMath: return UIA_GroupControlTypeId; + // TODO(http://crbug.com/1260585): Refine this if/when a UIA API exists for + // properly exposing MathML content. + case ax::mojom::Role::kMathMLFraction: + case ax::mojom::Role::kMathMLIdentifier: + case ax::mojom::Role::kMathMLMultiscripts: + case ax::mojom::Role::kMathMLNoneScript: + case ax::mojom::Role::kMathMLNumber: + case ax::mojom::Role::kMathMLOperator: + case ax::mojom::Role::kMathMLOver: + case ax::mojom::Role::kMathMLPrescriptDelimiter: + case ax::mojom::Role::kMathMLRoot: + case ax::mojom::Role::kMathMLRow: + case ax::mojom::Role::kMathMLSquareRoot: + case ax::mojom::Role::kMathMLStringLiteral: + case ax::mojom::Role::kMathMLSub: + case ax::mojom::Role::kMathMLSubSup: + case ax::mojom::Role::kMathMLSup: + case ax::mojom::Role::kMathMLTable: + case ax::mojom::Role::kMathMLTableCell: + case ax::mojom::Role::kMathMLTableRow: + case ax::mojom::Role::kMathMLText: + case ax::mojom::Role::kMathMLUnder: + case ax::mojom::Role::kMathMLUnderOver: + return UIA_GroupControlTypeId; + case ax::mojom::Role::kMenu: return UIA_MenuControlTypeId;