Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: Source/core/accessibility/AXNodeObject.cpp

Issue 588653003: Adding support for ARIA 1.1 role="none" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding Layout Test Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 238
239 AccessibilityRole AXNodeObject::determineAriaRoleAttribute() const 239 AccessibilityRole AXNodeObject::determineAriaRoleAttribute() const
240 { 240 {
241 const AtomicString& ariaRole = getAttribute(roleAttr); 241 const AtomicString& ariaRole = getAttribute(roleAttr);
242 if (ariaRole.isNull() || ariaRole.isEmpty()) 242 if (ariaRole.isNull() || ariaRole.isEmpty())
243 return UnknownRole; 243 return UnknownRole;
244 244
245 AccessibilityRole role = ariaRoleToWebCoreRole(ariaRole); 245 AccessibilityRole role = ariaRoleToWebCoreRole(ariaRole);
246 246
247 // ARIA states if an item can get focus, it should not be presentational. 247 // ARIA states if an item can get focus, it should not be presentational.
248 if (role == PresentationalRole && canSetFocusAttribute()) 248 if ((role == NoneRole || role == PresentationalRole) && canSetFocusAttribute ())
249 return UnknownRole; 249 return UnknownRole;
250 250
251 if (role == ButtonRole) 251 if (role == ButtonRole)
252 role = buttonRoleType(); 252 role = buttonRoleType();
253 253
254 if (role == TextAreaRole && !ariaIsMultiline()) 254 if (role == TextAreaRole && !ariaIsMultiline())
255 role = TextFieldRole; 255 role = TextFieldRole;
256 256
257 role = remapAriaRoleDueToParent(role); 257 role = remapAriaRoleDueToParent(role);
258 258
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 float range = maxValueForRange() - minValueForRange(); 1696 float range = maxValueForRange() - minValueForRange();
1697 float value = valueForRange(); 1697 float value = valueForRange();
1698 1698
1699 value += range * (percentChange / 100); 1699 value += range * (percentChange / 100);
1700 setValue(String::number(value)); 1700 setValue(String::number(value));
1701 1701
1702 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru e); 1702 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru e);
1703 } 1703 }
1704 1704
1705 } // namespace blink 1705 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/accessibility/aria-none-role-expected.txt ('k') | Source/core/accessibility/AXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698