OLD | NEW |
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 Loading... |
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 Loading... |
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 }; |
OLD | NEW |