| 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 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 return cvox.Earcon.CHECK_ON; | 924 return cvox.Earcon.CHECK_ON; |
| 925 } else { | 925 } else { |
| 926 return cvox.Earcon.CHECK_OFF; | 926 return cvox.Earcon.CHECK_OFF; |
| 927 } | 927 } |
| 928 case 'combobox': | 928 case 'combobox': |
| 929 case 'listbox': | 929 case 'listbox': |
| 930 return cvox.Earcon.LISTBOX; | 930 return cvox.Earcon.LISTBOX; |
| 931 case 'textbox': | 931 case 'textbox': |
| 932 return cvox.Earcon.EDITABLE_TEXT; | 932 return cvox.Earcon.EDITABLE_TEXT; |
| 933 case 'listitem': | 933 case 'listitem': |
| 934 return cvox.Earcon.BULLET; | 934 return cvox.Earcon.LIST_ITEM; |
| 935 case 'link': | 935 case 'link': |
| 936 return cvox.Earcon.LINK; | 936 return cvox.Earcon.LINK; |
| 937 } | 937 } |
| 938 | 938 |
| 939 return null; | 939 return null; |
| 940 }; | 940 }; |
| 941 | 941 |
| 942 | 942 |
| 943 /** | 943 /** |
| 944 * Returns the role of the node. | 944 * Returns the role of the node. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 969 * @param {Node} node The node to be checked. | 969 * @param {Node} node The node to be checked. |
| 970 * @return {boolean} Whether or not the node is an ARIA math node. | 970 * @return {boolean} Whether or not the node is an ARIA math node. |
| 971 */ | 971 */ |
| 972 cvox.AriaUtil.isMath = function(node) { | 972 cvox.AriaUtil.isMath = function(node) { |
| 973 if (!node || !node.getAttribute) { | 973 if (!node || !node.getAttribute) { |
| 974 return false; | 974 return false; |
| 975 } | 975 } |
| 976 var role = cvox.AriaUtil.getRoleAttribute(node); | 976 var role = cvox.AriaUtil.getRoleAttribute(node); |
| 977 return role == 'math'; | 977 return role == 'math'; |
| 978 }; | 978 }; |
| OLD | NEW |