forked from chromium/chromium
-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Map MathML elements to specific roles
This CL introduces the minimal number of MathML roles so that one can implement role and attribute mapping for ATK and AX API [1]. Exact roles for some tags are still being discussed on the spec side and might change in the future [2] [3] [4] [5] [6]. On Windows and Android platforms, math roles is a bit undefined and so some dummy role mapping is used right now. Node tests are added to cover all elements of MathML Core. These new tests also verify that the MathML element tags are exposed as an AtkObject attribute. [1] https://w3c.github.io/mathml-aam/ [2] w3c/mathml-aam#9 [3] w3c/mathml-aam#11 [4] w3c/mathml-aam#12 [5] w3c/mathml-aam#13 [6] w3c/mathml-aam#14 AX-Relnotes: MathML elements are exposed in the accessible tree with specific roles. Bug: 6606, 1038895, 1051115, 1038897, 1038898, 1038899, 1038900, 1038901, 1038911, 1038913, 1052420 Change-Id: I7e857a0cfc05616a30bf4842e334c1dfde082d49 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3207929 Commit-Queue: Frédéric Wang <[email protected]> Reviewed-by: Nektarios Paisios <[email protected]> Reviewed-by: Tom Sepez <[email protected]> Cr-Commit-Position: refs/heads/main@{#933442}
- Loading branch information
Showing
141 changed files
with
1,052 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
content/test/data/accessibility/html/math-expected-android.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 13 additions & 10 deletions
23
content/test/data/accessibility/html/math-expected-mac.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 13 additions & 10 deletions
23
content/test/data/accessibility/html/math-expected-win.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE | ||
++IA2_ROLE_SECTION | ||
++++ROLE_SYSTEM_EQUATION inner_html='<newline> <mrow><newline> <msup><mi>%F0%9D%90%B4</mi><mn>2</mn></msup><newline> <mo>+</mo><newline> <msup><mi>%F0%9D%90%B5</mi><mn>2</mn></msup><newline> </mrow><newline> ' | ||
++++++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' |
16 changes: 8 additions & 8 deletions
16
content/test/data/accessibility/html/math-name-from-contents-expected-blink.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' |
1 change: 1 addition & 0 deletions
1
content/test/data/accessibility/mathml/annotation-node-expected-auralinux.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[static] tag:annotation |
1 change: 1 addition & 0 deletions
1
content/test/data/accessibility/mathml/annotation-node-expected-blink.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mathMLText |
1 change: 1 addition & 0 deletions
1
content/test/data/accessibility/mathml/annotation-node-expected-mac.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
AXGroup AXSubrole=AXMathText |
1 change: 1 addition & 0 deletions
1
content/test/data/accessibility/mathml/annotation-xml-node-expected-auralinux.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[section] tag:annotation-xml |
1 change: 1 addition & 0 deletions
1
content/test/data/accessibility/mathml/annotation-xml-node-expected-blink.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mathMLRow |
1 change: 1 addition & 0 deletions
1
content/test/data/accessibility/mathml/annotation-xml-node-expected-mac.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
AXGroup AXSubrole=AXMathRow |
21 changes: 21 additions & 0 deletions
21
content/test/data/accessibility/mathml/annotation-xml.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
@MAC-ALLOW:AXSubrole | ||
@AURALINUX-ALLOW:tag:* | ||
--> | ||
<style> | ||
semantics > annotation-xml { display: math; } /* make annotation visible */ | ||
</style> | ||
<math> | ||
<semantics> | ||
<mfrac><mn>1</mn><mn>2</mn></mfrac> | ||
<annotation encoding="application/x-tex">\frac{1}{2}</annotation> | ||
<annotation-xml class="test" encoding="application/mathml-content+xml"> | ||
<apply> | ||
<divide/> | ||
<cn>1</cn> | ||
<cn>2</cn> | ||
</apply> | ||
</annotation-xml> | ||
</semantics> | ||
</math> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
@MAC-ALLOW:AXSubrole | ||
@AURALINUX-ALLOW:tag:* | ||
--> | ||
<style> | ||
semantics > annotation { display: math; } /* make annotation visible */ | ||
</style> | ||
<math> | ||
<semantics> | ||
<mfrac><mn>1</mn><mn>2</mn></mfrac> | ||
<annotation class="test" encoding="application/x-tex">\frac{1}{2}</annotation> | ||
<annotation-xml encoding="application/mathml-content+xml"> | ||
<apply> | ||
<divide/> | ||
<cn>1</cn> | ||
<cn>2</cn> | ||
</apply> | ||
</annotation-xml> | ||
</semantics> | ||
</math> |
1 change: 1 addition & 0 deletions
1
content/test/data/accessibility/mathml/maction-node-expected-auralinux.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[section] tag:maction |
1 change: 1 addition & 0 deletions
1
content/test/data/accessibility/mathml/maction-node-expected-blink.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mathMLRow |
1 change: 1 addition & 0 deletions
1
content/test/data/accessibility/mathml/maction-node-expected-mac.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
AXGroup AXSubrole=AXMathRow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
@MAC-ALLOW:AXSubrole | ||
@AURALINUX-ALLOW:tag:* | ||
--> | ||
<math> | ||
<maction class="test"> | ||
<mn>1</mn> | ||
<mn>2</mn> | ||
<mn>3</mn> | ||
<mn>4</mn> | ||
</maction> | ||
</math> |
1 change: 1 addition & 0 deletions
1
content/test/data/accessibility/mathml/math-node-expected-auralinux.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[math] tag:math |
1 change: 1 addition & 0 deletions
1
content/test/data/accessibility/mathml/math-node-expected-blink.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mathMLMath |
1 change: 1 addition & 0 deletions
1
content/test/data/accessibility/mathml/math-node-expected-mac.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
AXGroup AXSubrole=AXDocumentMath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
@MAC-ALLOW:AXSubrole | ||
@AURALINUX-ALLOW:tag:* | ||
--> | ||
<math class="test"> | ||
</math> |
1 change: 1 addition & 0 deletions
1
content/test/data/accessibility/mathml/merror-node-expected-auralinux.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[section] tag:merror |
Oops, something went wrong.