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

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

Issue 590183003: Adds accessibility role for details element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « no previous file | Source/core/accessibility/AXObject.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 AccessibilityRole ariaRole = ariaRoleAttribute(); 184 AccessibilityRole ariaRole = ariaRoleAttribute();
185 if (ariaRole != UnknownRole) 185 if (ariaRole != UnknownRole)
186 return ariaRole; 186 return ariaRole;
187 187
188 if (node()->isLink()) 188 if (node()->isLink())
189 return LinkRole; 189 return LinkRole;
190 if (node()->isTextNode()) 190 if (node()->isTextNode())
191 return StaticTextRole; 191 return StaticTextRole;
192 if (isHTMLButtonElement(*node())) 192 if (isHTMLButtonElement(*node()))
193 return buttonRoleType(); 193 return buttonRoleType();
194 if (isHTMLDetailsElement(*node()))
195 return DetailsRole;
194 if (isHTMLInputElement(*node())) { 196 if (isHTMLInputElement(*node())) {
195 HTMLInputElement& input = toHTMLInputElement(*node()); 197 HTMLInputElement& input = toHTMLInputElement(*node());
196 const AtomicString& type = input.type(); 198 const AtomicString& type = input.type();
197 if (type == InputTypeNames::checkbox) 199 if (type == InputTypeNames::checkbox)
198 return CheckBoxRole; 200 return CheckBoxRole;
199 if (type == InputTypeNames::radio) 201 if (type == InputTypeNames::radio)
200 return RadioButtonRole; 202 return RadioButtonRole;
201 if (input.isTextButton()) 203 if (input.isTextButton())
202 return buttonRoleType(); 204 return buttonRoleType();
203 if (type == InputTypeNames::range) 205 if (type == InputTypeNames::range)
(...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 float range = maxValueForRange() - minValueForRange(); 1698 float range = maxValueForRange() - minValueForRange();
1697 float value = valueForRange(); 1699 float value = valueForRange();
1698 1700
1699 value += range * (percentChange / 100); 1701 value += range * (percentChange / 100);
1700 setValue(String::number(value)); 1702 setValue(String::number(value));
1701 1703
1702 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru e); 1704 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru e);
1703 } 1705 }
1704 1706
1705 } // namespace blink 1707 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/accessibility/AXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698