RESOLVED FIXED 158876
AX: HTML indeterminate IDL attribute not mapped to checkbox value=2 for native checkboxes
https://bugs.webkit.org/show_bug.cgi?id=158876
Summary AX: HTML indeterminate IDL attribute not mapped to checkbox value=2 for nativ...
chris fleizach
Reported 2016-06-17 10:19:40 PDT
Indeterminate not working on native checkboxes
Attachments
patch (5.36 KB, patch)
2016-06-17 11:44 PDT, chris fleizach
no flags
patch (5.44 KB, patch)
2016-06-17 17:02 PDT, chris fleizach
no flags
chris fleizach
Comment 1 2016-06-17 10:19:54 PDT
Radar WebKit Bug Importer
Comment 2 2016-06-17 10:20:23 PDT
chris fleizach
Comment 3 2016-06-17 11:44:59 PDT
Joanmarie Diggs
Comment 4 2016-06-17 16:29:04 PDT
Comment on attachment 281571 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=281571&action=review > LayoutTests/accessibility/checkbox-mixed-value.html:27 > + debug(element.stringValue + "\n"); Please use (at least*) AccessibilityUIElement::isIndeterminate(). On my platform, exposure of this property is not through string value, but through state. * "at least" because I think that is sufficient -- unless you want to not just verify not indeterminate, but also not checked.
chris fleizach
Comment 5 2016-06-17 16:30:44 PDT
Comment on attachment 281571 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=281571&action=review >> LayoutTests/accessibility/checkbox-mixed-value.html:27 >> + debug(element.stringValue + "\n"); > > Please use (at least*) AccessibilityUIElement::isIndeterminate(). On my platform, exposure of this property is not through string value, but through state. > > * "at least" because I think that is sufficient -- unless you want to not just verify not indeterminate, but also not checked. In this case we want to test that value ends up producing a 2 instead of 0. Maybe I should just move this to the Mac platform in that case? What do you think
Joanmarie Diggs
Comment 6 2016-06-17 16:49:14 PDT
(In reply to comment #5) > Comment on attachment 281571 [details] > patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=281571&action=review > > >> LayoutTests/accessibility/checkbox-mixed-value.html:27 > >> + debug(element.stringValue + "\n"); > > > > Please use (at least*) AccessibilityUIElement::isIndeterminate(). On my platform, exposure of this property is not through string value, but through state. > > > > * "at least" because I think that is sufficient -- unless you want to not just verify not indeterminate, but also not checked. > > In this case we want to test that value ends up producing a 2 instead of 0. > Maybe I should just move this to the Mac platform in that case? What do you > think I think the test belongs cross-platform if possible. Here's your platform's method: bool AccessibilityUIElement::isIndeterminate() const { BOOL result = NO; BEGIN_AX_OBJC_EXCEPTIONS id value = [m_element accessibilityAttributeValue:NSAccessibilityValueAttribute]; if ([value isKindOfClass:[NSNumber class]]) result = [value intValue] == 2; END_AX_OBJC_EXCEPTIONS return result; } Does that not verify that the value ends up producing a 2 instead of 0?
chris fleizach
Comment 7 2016-06-17 16:51:29 PDT
(In reply to comment #6) > (In reply to comment #5) > > Comment on attachment 281571 [details] > > patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=281571&action=review > > > > >> LayoutTests/accessibility/checkbox-mixed-value.html:27 > > >> + debug(element.stringValue + "\n"); > > > > > > Please use (at least*) AccessibilityUIElement::isIndeterminate(). On my platform, exposure of this property is not through string value, but through state. > > > > > > * "at least" because I think that is sufficient -- unless you want to not just verify not indeterminate, but also not checked. > > > > In this case we want to test that value ends up producing a 2 instead of 0. > > Maybe I should just move this to the Mac platform in that case? What do you > > think > > I think the test belongs cross-platform if possible. Here's your platform's > method: > > bool AccessibilityUIElement::isIndeterminate() const > { > BOOL result = NO; > BEGIN_AX_OBJC_EXCEPTIONS > id value = [m_element > accessibilityAttributeValue:NSAccessibilityValueAttribute]; > if ([value isKindOfClass:[NSNumber class]]) > result = [value intValue] == 2; > END_AX_OBJC_EXCEPTIONS > return result; > } > > Does that not verify that the value ends up producing a 2 instead of 0? Good point. That should do it
Joanmarie Diggs
Comment 8 2016-06-17 17:00:17 PDT
BTW, from a quick glance at window's DRT (are they still using that?), AccessibilityUIElement::isIndeterminate() is not implemented. If they are still using DRT, skipping for Windows is probably going to be needed.
chris fleizach
Comment 9 2016-06-17 17:02:38 PDT
Joanmarie Diggs
Comment 10 2016-06-17 17:51:05 PDT
Comment on attachment 281598 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=281598&action=review > LayoutTests/accessibility/checkbox-mixed-value.html:27 > + debug("Indeterminate status: " + element.isIndeterminate + "\n"); Thanks!
WebKit Commit Bot
Comment 11 2016-06-17 18:19:15 PDT
Comment on attachment 281598 [details] patch Clearing flags on attachment: 281598 Committed r202194: <http://trac.webkit.org/changeset/202194>
WebKit Commit Bot
Comment 12 2016-06-17 18:19:19 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.