Bug 113895

Summary: Webkit exposes aria-expanded="undefined" as aria-expanded="false" (AXExpanded = NO)
Product: WebKit Reporter: James Craig <jcraig>
Component: AccessibilityAssignee: chris fleizach <cfleizach>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, cfleizach, commit-queue, dmazzoni, jcraig, jdiggs, mario, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch none

Description James Craig 2013-04-03 13:10:16 PDT
Webkit exposes aria-expanded="undefined" as aria-expanded="false" (AXExpanded = NO)

It should not expose this value unless the string value matches true or false. All other values (including "undefined", "foo", etc.) should not expose the AXExpanded property at all, b/c a NO value means "expandable but not expanded" whereas an undefined value means "not expandable."

Test Cases:

https://dvcs.w3.org/hg/pfwg/raw-file/default/ARIA/1.0/tests/test-files/roles-properties-supported-inherited/roles-properties-supported-inherited-tabpanel-aria-expanded-undefined.html

https://dvcs.w3.org/hg/pfwg/raw-file/default/ARIA/1.0/tests/test-files/roles-properties-supported-inherited/roles-properties-supported-inherited-timer-aria-expanded-undefined.html

https://dvcs.w3.org/hg/pfwg/raw-file/default/ARIA/1.0/tests/test-files/roles-properties-supported-inherited/roles-properties-supported-inherited-toolbar-aria-expanded-undefined.html

https://dvcs.w3.org/hg/pfwg/raw-file/default/ARIA/1.0/tests/test-files/roles-properties-supported-inherited/roles-properties-supported-inherited-tooltip-aria-expanded-undefined.html

https://dvcs.w3.org/hg/pfwg/raw-file/default/ARIA/1.0/tests/test-files/roles-properties-supported-inherited/roles-properties-supported-inherited-tree-aria-expanded-undefined.html

https://dvcs.w3.org/hg/pfwg/raw-file/default/ARIA/1.0/tests/test-files/roles-properties-supported-inherited/roles-properties-supported-inherited-treegrid-aria-expanded-undefined.html
Comment 1 Radar WebKit Bug Importer 2013-04-03 13:10:55 PDT
<rdar://problem/13569954>
Comment 2 James Craig 2013-06-28 15:21:08 PDT
*** Bug 115148 has been marked as a duplicate of this bug. ***
Comment 3 chris fleizach 2013-08-21 09:42:18 PDT
Created attachment 209278 [details]
patch
Comment 4 Darin Adler 2013-08-23 09:58:52 PDT
Comment on attachment 209278 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=209278&action=review

> Source/WebCore/accessibility/AccessibilityObject.cpp:1634
> +    const AtomicString& expanded = getAttribute(aria_expandedAttr);

Should be fastGetAttribute.
Comment 5 chris fleizach 2013-08-23 10:00:19 PDT
Comment on attachment 209278 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=209278&action=review

>> Source/WebCore/accessibility/AccessibilityObject.cpp:1634
>> +    const AtomicString& expanded = getAttribute(aria_expandedAttr);
> 
> Should be fastGetAttribute.

this is using the AXObject's getAttr method, which looks like it does call fastGetAttribute so we should be ok. thanks
Comment 6 WebKit Commit Bot 2013-08-23 10:23:48 PDT
Comment on attachment 209278 [details]
patch

Clearing flags on attachment: 209278

Committed r154496: <http://trac.webkit.org/changeset/154496>
Comment 7 WebKit Commit Bot 2013-08-23 10:23:50 PDT
All reviewed patches have been landed.  Closing bug.