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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/common/aria_util.js

Issue 2694903010: AX checked state changes (Closed)
Patch Set: git cl try Created 3 years, 8 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview A collection of JavaScript utilities used to simplify working 6 * @fileoverview A collection of JavaScript utilities used to simplify working
7 * with ARIA (http://www.w3.org/TR/wai-aria). 7 * with ARIA (http://www.w3.org/TR/wai-aria).
8 */ 8 */
9 9
10 10
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 /** 105 /**
106 * @type {Array<Object>} 106 * @type {Array<Object>}
107 */ 107 */
108 cvox.AriaUtil.ATTRIBUTE_VALUE_TO_STATUS = [ 108 cvox.AriaUtil.ATTRIBUTE_VALUE_TO_STATUS = [
109 { name: 'aria-autocomplete', values: 109 { name: 'aria-autocomplete', values:
110 {'inline' : 'aria_autocomplete_inline', 110 {'inline' : 'aria_autocomplete_inline',
111 'list' : 'aria_autocomplete_list', 111 'list' : 'aria_autocomplete_list',
112 'both' : 'aria_autocomplete_both'} }, 112 'both' : 'aria_autocomplete_both'} },
113 { name: 'aria-checked', values: 113 { name: 'aria-checked', values:
114 {'true' : 'aria_checked_true', 114 {'true' : 'checked_true',
115 'false' : 'aria_checked_false', 115 'false' : 'checked_false',
116 'mixed' : 'aria_checked_mixed'} }, 116 'mixed' : 'checked_mixed'} },
117 { name: 'aria-disabled', values: 117 { name: 'aria-disabled', values:
118 {'true' : 'aria_disabled_true'} }, 118 {'true' : 'aria_disabled_true'} },
119 { name: 'aria-expanded', values: 119 { name: 'aria-expanded', values:
120 {'true' : 'aria_expanded_true', 120 {'true' : 'aria_expanded_true',
121 'false' : 'aria_expanded_false'} }, 121 'false' : 'aria_expanded_false'} },
122 { name: 'aria-invalid', values: 122 { name: 'aria-invalid', values:
123 {'true' : 'aria_invalid_true', 123 {'true' : 'aria_invalid_true',
124 'grammar' : 'aria_invalid_grammar', 124 'grammar' : 'aria_invalid_grammar',
125 'spelling' : 'aria_invalid_spelling'} }, 125 'spelling' : 'aria_invalid_spelling'} },
126 { name: 'aria-multiline', values: 126 { name: 'aria-multiline', values:
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 * @param {Node} node The node to be checked. 965 * @param {Node} node The node to be checked.
966 * @return {boolean} Whether or not the node is an ARIA math node. 966 * @return {boolean} Whether or not the node is an ARIA math node.
967 */ 967 */
968 cvox.AriaUtil.isMath = function(node) { 968 cvox.AriaUtil.isMath = function(node) {
969 if (!node || !node.getAttribute) { 969 if (!node || !node.getAttribute) {
970 return false; 970 return false;
971 } 971 }
972 var role = cvox.AriaUtil.getRoleAttribute(node); 972 var role = cvox.AriaUtil.getRoleAttribute(node);
973 return role == 'math'; 973 return role == 'math';
974 }; 974 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698