Commit 2ba7beab authored by shreeram.k's avatar shreeram.k Committed by Commit bot

Expose aria-pressed as STATE_SYSTEM_PRESSED on windows

According to specs http://rawgit.com/w3c/aria/master/core-aam/core-aam.html

aria-pressed {true, mixed} should set STATE_SYSTEM_PRESSED and false should
clear STATE_SYSTEM_PRESSED

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

BUG=171625

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

Cr-Commit-Position: refs/heads/master@{#308073}
parent 628e793a
......@@ -3412,14 +3412,6 @@ void BrowserAccessibilityWin::InitRoleAndState() {
break;
case ui::AX_ROLE_BUTTON:
ia_role_ = ROLE_SYSTEM_PUSHBUTTON;
bool is_aria_pressed_defined;
bool is_mixed;
if (GetAriaTristate("aria-pressed", &is_aria_pressed_defined, &is_mixed))
ia_state_ |= STATE_SYSTEM_PRESSED;
if (is_aria_pressed_defined)
ia2_role_ = IA2_ROLE_TOGGLE_BUTTON;
if (is_mixed)
ia_state_ |= STATE_SYSTEM_MIXED;
break;
case ui::AX_ROLE_CANVAS:
if (GetBoolAttribute(ui::AX_ATTR_CANVAS_HAS_FALLBACK)) {
......
#<skip - http://crbug.com/171625>
ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE
ROLE_SYSTEM_PUSHBUTTON xml-roles:button
IA2_ROLE_TOGGLE_BUTTON xml-roles:button PRESSED checkable:true
IA2_ROLE_TOGGLE_BUTTON xml-roles:button checkable:true
ROLE_SYSTEM_BUTTONMENU HASPOPUP xml-roles:button
ROLE_SYSTEM_PUSHBUTTON xml-roles:button
ROLE_SYSTEM_PUSHBUTTON FOCUSABLE xml-roles:button
IA2_ROLE_TOGGLE_BUTTON PRESSED FOCUSABLE xml-roles:button checkable:true
IA2_ROLE_TOGGLE_BUTTON FOCUSABLE xml-roles:button checkable:true
ROLE_SYSTEM_BUTTONMENU FOCUSABLE HASPOPUP xml-roles:button
ROLE_SYSTEM_PUSHBUTTON FOCUSABLE xml-roles:button
#<skip - PRESSED not set: http://crbug.com/171625>
ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE
ROLE_SYSTEM_PUSHBUTTON FOCUSABLE
IA2_ROLE_TOGGLE_BUTTON FOCUSABLE checkable:true
IA2_ROLE_TOGGLE_BUTTON FOCUSABLE PRESSED checkable:true
IA2_ROLE_TOGGLE_BUTTON FOCUSABLE PRESSED checkable:true
IA2_ROLE_TOGGLE_BUTTON PRESSED FOCUSABLE checkable:true
IA2_ROLE_TOGGLE_BUTTON PRESSED FOCUSABLE checkable:true
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment