Changeset 52809 in webkit
- Timestamp:
- Jan 5, 2010 11:00:29 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r52786 r52809 1 2010-01-05 Dominic Mazzoni <dmazzoni@google.com> 2 3 Reviewed by Darin Adler. 4 5 https://bugs.webkit.org/show_bug.cgi?id=32571 6 7 Added a test to make sure that ARIA checkboxes correctly handle the aria-checked attribute. 8 9 * accessibility/aria-checkbox-checked-expected.txt: Added. 10 * accessibility/aria-checkbox-checked.html: Added. 11 1 12 2010-01-04 Chris Fleizach <cfleizach@apple.com> 2 13 -
trunk/WebCore/ChangeLog
r52801 r52809 1 2010-01-05 Dominic Mazzoni <dmazzoni@google.com> 2 3 Reviewed by Darin Adler. 4 5 https://bugs.webkit.org/show_bug.cgi?id=32571 6 7 For an object with an aria role of "checkbox" or "radiobutton", 8 Use the "aria-checked" attribute to determine if it's checked. 9 10 Test: accessibility/aria-checkbox-checked.html 11 12 * accessibility/AccessibilityRenderObject.cpp: 13 (WebCore::AccessibilityRenderObject::isChecked): 14 1 15 2010-01-05 Yong Li <yoli@rim.com> 2 16 -
trunk/WebCore/accessibility/AccessibilityRenderObject.cpp
r52786 r52809 364 364 return false; 365 365 366 // First test for native checkedness semantics 366 367 InputElement* inputElement = toInputElement(static_cast<Element*>(m_renderer->node())); 367 if (!inputElement) 368 return false; 369 370 return inputElement->isChecked(); 368 if (inputElement) 369 return inputElement->isChecked(); 370 371 // Else, if this is an ARIA checkbox or radio, respect the aria-checked attribute 372 AccessibilityRole ariaRole = ariaRoleAttribute(); 373 if (ariaRole == RadioButtonRole || ariaRole == CheckBoxRole) { 374 if (equalIgnoringCase(getAttribute(aria_checkedAttr), "true")) 375 return true; 376 return false; 377 } 378 379 // Otherwise it's not checked 380 return false; 371 381 } 372 382 -
trunk/WebKitTools/ChangeLog
r52808 r52809 1 2010-01-05 Dominic Mazzoni <dmazzoni@google.com> 2 3 Reviewed by Darin Adler. 4 5 https://bugs.webkit.org/show_bug.cgi?id=32571 6 7 For an object with an aria role of "checkbox" or "radiobutton", 8 use the "aria-checked" attribute to determine if it's checked. 9 These changes add an isChecked() method to AccessibilityUIElement 10 so that we can check for this property from a layout test. 11 12 * DumpRenderTree/AccessibilityUIElement.cpp: 13 (getIsCheckedCallback): 14 (AccessibilityUIElement::getJSClass): 15 * DumpRenderTree/AccessibilityUIElement.h: 16 * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp: 17 (AccessibilityUIElement::isChecked): 18 * DumpRenderTree/mac/AccessibilityUIElementMac.mm: 19 (AccessibilityUIElement::isChecked): 20 * DumpRenderTree/win/AccessibilityUIElementWin.cpp: 21 (AccessibilityUIElement::isChecked): 22 1 23 2010-01-05 David Levin <levin@chromium.org> 2 24 -
trunk/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
r52786 r52809 496 496 { 497 497 return JSValueMakeBoolean(context, toAXElement(thisObject)->isExpanded()); 498 } 499 500 static JSValueRef getIsCheckedCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*) 501 { 502 return JSValueMakeBoolean(context, toAXElement(thisObject)->isChecked()); 498 503 } 499 504 … … 584 589 { "isSelected", getIsSelectedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 585 590 { "isExpanded", getIsExpandedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 591 { "isChecked", getIsCheckedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 586 592 { "valueDescription", getValueDescriptionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 587 593 { "hierarchicalLevel", hierarchicalLevelCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
r52786 r52809 105 105 double width(); 106 106 double height(); 107 double intValue() ;107 double intValue() const; 108 108 double minValue(); 109 109 double maxValue(); … … 115 115 bool isSelected() const; 116 116 bool isExpanded() const; 117 bool isChecked() const; 117 118 int hierarchicalLevel() const; 118 119 double clickPointX(); -
trunk/WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
r52786 r52809 256 256 } 257 257 258 double AccessibilityUIElement::intValue() 258 double AccessibilityUIElement::intValue() const 259 259 { 260 260 GValue value = { 0, { { 0 } } }; … … 366 366 } 367 367 368 bool AccessibilityUIElement::isChecked() const 369 { 370 return intValue(); 371 } 372 368 373 JSStringRef AccessibilityUIElement::attributesOfColumnHeaders() 369 374 { -
trunk/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
r52789 r52809 470 470 } 471 471 472 double AccessibilityUIElement::intValue() 472 double AccessibilityUIElement::intValue() const 473 473 { 474 474 id value = [m_element accessibilityAttributeValue:NSAccessibilityValueAttribute]; … … 546 546 return [value boolValue]; 547 547 return false; 548 } 549 550 bool AccessibilityUIElement::isChecked() const 551 { 552 // On the Mac, intValue()==1 if a a checkable control is checked. 553 return intValue() == 1; 548 554 } 549 555 -
trunk/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
r52786 r52809 289 289 } 290 290 291 bool AccessibilityUIElement::isChecked() const 292 { 293 VARIANT vState; 294 if (FAILED(m_element->get_accState(self(), &vState))) 295 return false; 296 297 return vState.lVal & STATE_SYSTEM_CHECKED; 298 } 299 291 300 JSStringRef AccessibilityUIElement::orientation() const 292 301 { … … 294 303 } 295 304 296 double AccessibilityUIElement::intValue() 305 double AccessibilityUIElement::intValue() const 297 306 { 298 307 BSTR valueBSTR;
Note: See TracChangeset
for help on using the changeset viewer.