Skip to content

Commit

Permalink
HTML math tag should have AXRoleDescription as 'math'
Browse files Browse the repository at this point in the history
According to latest editor's draft http://rawgit.com/w3c/aria/master/html-aam/html-aam.html
HTML math tag should be exposed similar to ARIA role math and hence AXRoleDescription for math tag would be 'math.

This CL depends on https://codereview.chromium.org/722653002/

BUG=429476

Review URL: https://codereview.chromium.org/722663002

Cr-Commit-Position: refs/heads/master@{#304622}
  • Loading branch information
shreeram.k authored and Commit bot committed Nov 18, 2014
1 parent 5ba11a6 commit 0bc5a9a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 3 deletions.
3 changes: 3 additions & 0 deletions content/app/strings/content_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@ below:
<message name="IDS_AX_ROLE_FORM" desc="accessibility role description for form">
form
</message>
<message name="IDS_AX_ROLE_MATH" desc="accessibility role description for math">
math
</message>

<message name="IDS_AX_BUTTON_ACTION_VERB" desc="Verb stating the action that will occur when a button is pressed, as used by accessibility.">
press
Expand Down
3 changes: 3 additions & 0 deletions content/browser/accessibility/browser_accessibility_cocoa.mm
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,9 @@ - (NSString*)roleDescription {
case ui::AX_ROLE_MAIN:
return base::SysUTF16ToNSString(content_client->GetLocalizedString(
IDS_AX_ROLE_MAIN_CONTENT));
case ui::AX_ROLE_MATH:
return base::SysUTF16ToNSString(content_client->GetLocalizedString(
IDS_AX_ROLE_MATH));
case ui::AX_ROLE_NAVIGATION:
return base::SysUTF16ToNSString(content_client->GetLocalizedString(
IDS_AX_ROLE_NAVIGATIONAL_LINK));
Expand Down
4 changes: 3 additions & 1 deletion content/test/data/accessibility/math-expected-android.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#<skip - blink side patch is required>
android.webkit.WebView focusable focused scrollable
android.view.View
android.view.View clickable name='a2+b2'
9 changes: 8 additions & 1 deletion content/test/data/accessibility/math-expected-mac.txt
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
#<skip - blink side patch is required>
AXWebArea AXRoleDescription='HTML content'
AXGroup AXRoleDescription='group'
AXGroup AXSubrole=AXDocumentMath AXRoleDescription='math'
AXStaticText AXRoleDescription='text' AXValue='a'
AXStaticText AXRoleDescription='text' AXValue='2'
AXStaticText AXRoleDescription='text' AXValue='+'
AXStaticText AXRoleDescription='text' AXValue='b'
AXStaticText AXRoleDescription='text' AXValue='2'
9 changes: 8 additions & 1 deletion content/test/data/accessibility/math-expected-win.txt
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
#<skip - blink side patch is required>
ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE
IA2_ROLE_SECTION
ROLE_SYSTEM_EQUATION
ROLE_SYSTEM_STATICTEXT name='a'
ROLE_SYSTEM_STATICTEXT name='2'
ROLE_SYSTEM_STATICTEXT name='+'
ROLE_SYSTEM_STATICTEXT name='b'
ROLE_SYSTEM_STATICTEXT name='2'

0 comments on commit 0bc5a9a

Please sign in to comment.