Changeset 126369 in webkit
- Timestamp:
- Aug 22, 2012 5:36:06 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r126367 r126369 1 2012-08-22 Alejandro Piñeiro <apinheiro@igalia.com> 2 3 [Gtk] Dojo toggle buttons should expose ROLE_TOGGLE_BUTTON not ROLE_PUSH_BUTTON 4 https://bugs.webkit.org/show_bug.cgi?id=73819 5 6 Reviewed by Chris Fleizach. 7 8 Added a test to verify that when aria-pressed is present, buttons 9 will have the appropiate role. 10 11 * platform/gtk/accessibility/aria-toggle-button-role-expected.txt: Added. 12 * platform/gtk/accessibility/aria-toggle-button-role.html: Added. 13 1 14 2012-08-22 Kenneth Russell <kbr@google.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r126366 r126369 1 2012-08-22 Alejandro Piñeiro <apinheiro@igalia.com> 2 3 [Gtk] Dojo toggle buttons should expose ROLE_TOGGLE_BUTTON not ROLE_PUSH_BUTTON 4 https://bugs.webkit.org/show_bug.cgi?id=73819 5 6 Reviewed by Chris Fleizach. 7 8 Added a new role, Toggle Button, based on whether aria-pressed is present. 9 http://www.w3.org/TR/wai-aria/states_and_properties#aria-pressed 10 11 Test: platform/gtk/accessibility/aria-toggle-button-role.html 12 13 * accessibility/AccessibilityNodeObject.cpp: 14 (WebCore::AccessibilityNodeObject::determineAccessibilityRole): using buttonRoleType 15 to classify a button-related role. 16 (WebCore::AccessibilityNodeObject::determineAriaRoleAttribute): using buttonRoleType 17 to classify a button-related role. 18 * accessibility/AccessibilityObject.cpp: 19 (WebCore::AccessibilityObject::ariaPressedIsPresent): checks if aria-pressed 20 attribute is present. 21 (WebCore::AccessibilityObject::buttonRoleType): returns a specific button-related 22 role if the object is a button-related role. 23 * accessibility/AccessibilityObject.h: 24 (AccessibilityObject): added new role ToggleButtonRole. 25 * accessibility/AccessibilityRenderObject.cpp: 26 (WebCore::AccessibilityRenderObject::determineAccessibilityRole): using buttonRoleType 27 to classify a button-related role. 28 * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp: 29 (atkRole): added a mapping between ToggleButtonRole and 30 ATK_ROLE_TOGGLE_BUTTON. 31 * accessibility/mac/WebAccessibilityObjectWrapper.mm: 32 (createAccessibilityRoleMap): added a mapping between 33 ToggleButtonRole and NSAccessibilityButtonRole 34 1 35 2012-08-22 David Grogan <dgrogan@chromium.org> 2 36 -
trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp
r123428 r126369 251 251 return StaticTextRole; 252 252 if (node()->hasTagName(buttonTag)) 253 return ariaHasPopup() ? PopUpButtonRole : ButtonRole;253 return buttonRoleType(); 254 254 if (node()->hasTagName(inputTag)) { 255 255 HTMLInputElement* input = static_cast<HTMLInputElement*>(node()); … … 259 259 return RadioButtonRole; 260 260 if (input->isTextButton()) 261 return ariaHasPopup() ? PopUpButtonRole : ButtonRole;261 return buttonRoleType(); 262 262 return TextFieldRole; 263 263 } … … 337 337 if (role == PresentationalRole && canSetFocusAttribute()) 338 338 return UnknownRole; 339 340 if (role == ButtonRole && ariaHasPopup())341 role = PopUpButtonRole;339 340 if (role == ButtonRole) 341 role = buttonRoleType(); 342 342 343 343 if (role == TextAreaRole && !ariaIsMultiline()) -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r125710 r126369 1735 1735 } 1736 1736 } 1737 1737 1738 bool AccessibilityObject::ariaPressedIsPresent() const 1739 { 1740 return !getAttribute(aria_pressedAttr).isEmpty(); 1741 } 1742 1743 AccessibilityRole AccessibilityObject::buttonRoleType() const 1744 { 1745 // If aria-pressed is present, then it should be exposed as a toggle button. 1746 // http://www.w3.org/TR/wai-aria/states_and_properties#aria-pressed 1747 if (ariaPressedIsPresent()) 1748 return ToggleButtonRole; 1749 if (ariaHasPopup()) 1750 return PopUpButtonRole; 1751 // We don't contemplate RadioButtonRole, as it depends on the input 1752 // type. 1753 1754 return ButtonRole; 1755 } 1756 1738 1757 } // namespace WebCore -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r125710 r126369 188 188 TreeItemRole, 189 189 TextFieldRole, 190 ToggleButtonRole, 190 191 ToolbarRole, 191 192 UnknownRole, … … 452 453 virtual void ariaFlowToElements(AccessibilityChildrenVector&) const { } 453 454 virtual bool ariaHasPopup() const { return false; } 455 virtual bool ariaPressedIsPresent() const; 454 456 bool ariaIsMultiline() const; 455 457 virtual const AtomicString& invalidStatus() const; … … 716 718 static bool isAccessibilityTextSearchMatch(AccessibilityObject*, AccessibilitySearchCriteria*); 717 719 static bool objectMatchesSearchCriteriaWithResultLimit(AccessibilityObject*, AccessibilitySearchCriteria*, AccessibilityChildrenVector&); 720 virtual AccessibilityRole buttonRoleType() const; 718 721 719 722 #if PLATFORM(GTK) -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r125710 r126369 1689 1689 return elementAttributeValue(aria_haspopupAttr); 1690 1690 } 1691 1691 1692 1692 bool AccessibilityRenderObject::supportsARIAFlowTo() const 1693 1693 { … … 3144 3144 return ListMarkerRole; 3145 3145 if (node && node->hasTagName(buttonTag)) 3146 return ariaHasPopup() ? PopUpButtonRole : ButtonRole;3146 return buttonRoleType(); 3147 3147 if (m_renderer->isText()) 3148 3148 return StaticTextRole; … … 3171 3171 return RadioButtonRole; 3172 3172 if (input->isTextButton()) 3173 return ariaHasPopup() ? PopUpButtonRole : ButtonRole;3173 return buttonRoleType(); 3174 3174 } 3175 3175 -
trunk/Source/WebCore/accessibility/gtk/WebKitAccessibleWrapperAtk.cpp
r126243 r126369 431 431 case ButtonRole: 432 432 return ATK_ROLE_PUSH_BUTTON; 433 case ToggleButtonRole: 434 return ATK_ROLE_TOGGLE_BUTTON; 433 435 case RadioButtonRole: 434 436 return ATK_ROLE_RADIO_BUTTON; -
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm
r126359 r126369 1578 1578 { FormRole, NSAccessibilityGroupRole }, 1579 1579 { SpinButtonRole, NSAccessibilityIncrementorRole }, 1580 { FooterRole, NSAccessibilityGroupRole } 1580 { FooterRole, NSAccessibilityGroupRole }, 1581 { ToggleButtonRole, NSAccessibilityButtonRole } 1581 1582 }; 1582 1583 AccessibilityRoleMap& roleMap = *new AccessibilityRoleMap; -
trunk/Source/WebKit/chromium/ChangeLog
r126365 r126369 1 2012-08-22 Alejandro Piñeiro <apinheiro@igalia.com> 2 3 Dojo toggle buttons should expose ROLE_TOGGLE_BUTTON not ROLE_PUSH_BUTTON 4 https://bugs.webkit.org/show_bug.cgi?id=73819 5 6 Reviewed by Chris Fleizach. 7 8 Added a new role, Toggle Button, based on whether aria-pressed is present. 9 http://www.w3.org/TR/wai-aria/states_and_properties#aria-pressed 10 11 * public/WebAccessibilityRole.h: added WebAccessibilityRoleToggleButton that 12 matchs with WebCore ToggleButtonRole 13 * src/AssertMatchingEnums.cpp: added the assert matching rule for 14 WebAccessibilityRoleToggleButton and ToggleButtonRole 15 1 16 2012-08-17 Jeffrey Pfau <jpfau@apple.com> 2 17 -
trunk/Source/WebKit/chromium/public/WebAccessibilityRole.h
r110828 r126369 134 134 WebAccessibilityRoleTreeItemRole, 135 135 WebAccessibilityRoleTextField, 136 WebAccessibilityRoleToggleButton, 136 137 WebAccessibilityRoleToolbar, 137 138 WebAccessibilityRoleUnknown, -
trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
r125225 r126369 258 258 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDocumentRegion, DocumentRegionRole); 259 259 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleUserInterfaceTooltip, UserInterfaceTooltipRole); 260 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleToggleButton, ToggleButtonRole); 260 261 261 262 COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Uncached, ApplicationCacheHost::UNCACHED); -
trunk/Tools/ChangeLog
r126368 r126369 1 2012-08-22 Alejandro Piñeiro <apinheiro@igalia.com> 2 3 Dojo toggle buttons should expose ROLE_TOGGLE_BUTTON not ROLE_PUSH_BUTTON 4 https://bugs.webkit.org/show_bug.cgi?id=73819 5 6 Reviewed by Chris Fleizach. 7 8 Added a new role, Toggle Button, based on whether aria-pressed is present. 9 http://www.w3.org/TR/wai-aria/states_and_properties#aria-pressed 10 11 * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp: 12 (roleToString): added "ToggleButton" string for WebAccessibilityRoleToggleButton 13 1 14 2012-08-23 Victor Carbune <victor@rosedu.org> 2 15 -
trunk/Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp
r124581 r126369 205 205 case WebAccessibilityRoleUserInterfaceTooltip: 206 206 return result.append("UserInterfaceTooltip"); 207 case WebAccessibilityRoleToggleButton: 208 return result.append("ToggleButton"); 207 209 default: 208 210 // Also matches WebAccessibilityRoleUnknown.
Note: See TracChangeset
for help on using the changeset viewer.