Skip to content

Commit

Permalink
fixup! Introduce SupportsARIAExpanded() for aria-expanded
Browse files Browse the repository at this point in the history
Chrome/VoiceOver didn't narrates `aria-expanded` state in latest code.
We fix from AriaRoleAttribute() to RoleValue() in SupportsARIAExpanded.

Bug: 824465
Change-Id: Ib9ded5bbf84ad59f96cd2eb06cdd18eb537d8224
Reviewed-on: https://chromium-review.googlesource.com/989633
Commit-Queue: Nektarios Paisios <[email protected]>
Reviewed-by: Nektarios Paisios <[email protected]>
Reviewed-by: Aaron Leventhal <[email protected]>
Cr-Commit-Position: refs/heads/master@{#548140}
  • Loading branch information
djmixkim authored and Commit Bot committed Apr 4, 2018
1 parent f8b28ba commit cd1f4d3
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rootWebArea name='Action verbs'
++radioButton defaultActionVerb=check checkedState=false
++switch name='ARIA Switch' defaultActionVerb=check checkedState=false
++details
++++disclosureTriangle name='Summary' defaultActionVerb=press
++++disclosureTriangle collapsed name='Summary' defaultActionVerb=press
++++++staticText name='Summary'
++++++++inlineTextBox name='Summary'
++popUpButton collapsed haspopup defaultActionVerb=open
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ROLE_SYSTEM_DOCUMENT name='Action verbs' READONLY FOCUSABLE
++ROLE_SYSTEM_RADIOBUTTON FOCUSABLE IA2_STATE_CHECKABLE checkable:true default_action='check' action_name='check'
++IA2_ROLE_TOGGLE_BUTTON name='ARIA Switch' FOCUSABLE IA2_STATE_CHECKABLE checkable:true default_action='check' action_name='check'
++ROLE_SYSTEM_GROUPING
++++ROLE_SYSTEM_PUSHBUTTON name='Summary' FOCUSABLE default_action='press' action_name='press'
++++ROLE_SYSTEM_PUSHBUTTON name='Summary' COLLAPSED FOCUSABLE default_action='press' action_name='press'
++++++ROLE_SYSTEM_STATICTEXT name='Summary'
++ROLE_SYSTEM_COMBOBOX COLLAPSED FOCUSABLE HASPOPUP default_action='open' action_name='open'
++++ROLE_SYSTEM_LIST INVISIBLE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rootWebArea
++details
++++disclosureTriangle name='details tag'
++++disclosureTriangle collapsed name='details tag'
++++++staticText name='details tag'
++++++++inlineTextBox name='details tag'
++details
Expand Down
4 changes: 2 additions & 2 deletions content/test/data/accessibility/html/details-expected-mac.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
AXWebArea AXRoleDescription='HTML content'
++AXGroup AXRoleDescription='group'
++++AXButton AXRoleDescription='disclosure triangle' AXTitle='details tag'
++++AXButton AXRoleDescription='disclosure triangle' AXTitle='details tag' AXExpanded='0'
++++++AXStaticText AXRoleDescription='text' AXValue='details tag'
++AXGroup AXRoleDescription='group'
++++AXButton AXRoleDescription='disclosure triangle' AXTitle='details tag open'
++++AXButton AXRoleDescription='disclosure triangle' AXTitle='details tag open' AXExpanded='1'
++++++AXStaticText AXRoleDescription='text' AXValue='details tag open'
++++AXGroup AXRoleDescription='group'
++++++AXStaticText AXRoleDescription='text' AXValue='The details tag with open specifies that the details should be visible (open) to the user.'
4 changes: 2 additions & 2 deletions content/test/data/accessibility/html/details-expected-win.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE
++ROLE_SYSTEM_GROUPING
++++ROLE_SYSTEM_PUSHBUTTON name='details tag' FOCUSABLE
++++ROLE_SYSTEM_PUSHBUTTON name='details tag' COLLAPSED FOCUSABLE
++++++ROLE_SYSTEM_STATICTEXT name='details tag'
++ROLE_SYSTEM_GROUPING
++++ROLE_SYSTEM_PUSHBUTTON name='details tag open' FOCUSABLE
++++ROLE_SYSTEM_PUSHBUTTON name='details tag open' EXPANDED FOCUSABLE
++++++ROLE_SYSTEM_STATICTEXT name='details tag open'
++++IA2_ROLE_PARAGRAPH
++++++ROLE_SYSTEM_STATICTEXT name='The details tag with open specifies that the details should be visible (open) to the user.'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rootWebArea
++details
++++disclosureTriangle name='details tag'
++++disclosureTriangle collapsed name='details tag'
++++++staticText name='details tag'
++++++++inlineTextBox name='details tag'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE
++ROLE_SYSTEM_GROUPING
++++ROLE_SYSTEM_PUSHBUTTON name='details tag' FOCUSABLE
++++ROLE_SYSTEM_PUSHBUTTON name='details tag' COLLAPSED FOCUSABLE
++++++ROLE_SYSTEM_STATICTEXT name='details tag'
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ Tests name sources in details and summary.
}
]
},
"properties": [],
"properties": [
{
"name": "expanded",
"value": {
"type": "booleanOrUndefined",
"value": false
}
}
],
"domNode": "summary#summary2"
}
{
Expand Down Expand Up @@ -75,7 +83,15 @@ Tests name sources in details and summary.
"type": "computedString",
"value": "summary3-title"
},
"properties": [],
"properties": [
{
"name": "expanded",
"value": {
"type": "booleanOrUndefined",
"value": false
}
}
],
"domNode": "summary#summary3"
}
{
Expand Down Expand Up @@ -128,7 +144,15 @@ Tests name sources in details and summary.
"type": "computedString",
"value": "summary4-contents"
},
"properties": [],
"properties": [
{
"name": "expanded",
"value": {
"type": "booleanOrUndefined",
"value": false
}
}
],
"domNode": "summary#summary4"
}
{
Expand Down Expand Up @@ -198,6 +222,13 @@ Tests name sources in details and summary.
"value": "summary5-contents"
},
"properties": [
{
"name": "expanded",
"value": {
"type": "booleanOrUndefined",
"value": false
}
},
{
"name": "labelledby",
"value": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,7 @@ bool AXObject::SupportsARIAActiveDescendant() const {
}

bool AXObject::SupportsARIAExpanded() const {
switch (AriaRoleAttribute()) {
switch (RoleValue()) {
case kAlertDialogRole:
case kAlertRole:
case kArticleRole:
Expand Down

0 comments on commit cd1f4d3

Please sign in to comment.