| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_COMMON_ACCESSIBILITY_MODE_ENUMS_H_ | |
| 6 #define CONTENT_COMMON_ACCESSIBILITY_MODE_ENUMS_H_ | |
| 7 | |
| 8 // Note: keep enums in content/browser/resources/accessibility/accessibility.js | |
| 9 // in sync with these two enums. | |
| 10 enum AccessibilityModeFlag { | |
| 11 // Native accessibility APIs, specific to each platform, are enabled. | |
| 12 // When this flag is set that indicates the presence of a third-party | |
| 13 // client accessing Chrome via accessibility APIs. However, unless one | |
| 14 // of the flags below is set, the contents of web pages will not be | |
| 15 // accessible. | |
| 16 ACCESSIBILITY_MODE_FLAG_NATIVE_APIS = 1 << 0, | |
| 17 | |
| 18 // The renderer process will generate an accessibility tree containing | |
| 19 // basic information about all nodes, including role, name, value, | |
| 20 // state, and location. This is the minimum flag required in order for | |
| 21 // web contents to be accessible, and the remaining flags are meaningless | |
| 22 // unless this one is set. | |
| 23 // | |
| 24 // Note that sometimes this flag will be set when | |
| 25 // ACCESSIBILITY_MODE_FLAG_NATIVE_APIS is not, when the content layer embedder | |
| 26 // is providing accessibility support via some other mechanism other than | |
| 27 // what's implemented in content/browser. | |
| 28 ACCESSIBILITY_MODE_FLAG_WEB_CONTENTS = 1 << 1, | |
| 29 | |
| 30 // The accessibility tree will contain inline text boxes, which are | |
| 31 // necessary to expose information about line breaks and word boundaries. | |
| 32 // Without this flag, you can retrieve the plaintext value of a text field | |
| 33 // but not the information about how it's broken down into lines. | |
| 34 // | |
| 35 // Note that when this flag is off it's still possible to request inline | |
| 36 // text boxes for a specific node on-demand, asynchronously. | |
| 37 ACCESSIBILITY_MODE_FLAG_INLINE_TEXT_BOXES = 1 << 2, | |
| 38 | |
| 39 // The accessibility tree will contain extra accessibility | |
| 40 // attributes typically only needed by screen readers and other | |
| 41 // assistive technology for blind users. Examples include text style | |
| 42 // attributes, table cell information, live region properties, range | |
| 43 // values, and relationship attributes. | |
| 44 ACCESSIBILITY_MODE_FLAG_SCREEN_READER = 1 << 3, | |
| 45 | |
| 46 // The accessibility tree will contain the HTML tag name and HTML attributes | |
| 47 // for all accessibility nodes that come from web content. | |
| 48 ACCESSIBILITY_MODE_FLAG_HTML = 1 << 4, | |
| 49 }; | |
| 50 | |
| 51 typedef int AccessibilityMode; | |
| 52 | |
| 53 const AccessibilityMode AccessibilityModeOff = 0; | |
| 54 | |
| 55 const AccessibilityMode ACCESSIBILITY_MODE_COMPLETE = | |
| 56 ACCESSIBILITY_MODE_FLAG_NATIVE_APIS | | |
| 57 ACCESSIBILITY_MODE_FLAG_WEB_CONTENTS | | |
| 58 ACCESSIBILITY_MODE_FLAG_INLINE_TEXT_BOXES | | |
| 59 ACCESSIBILITY_MODE_FLAG_SCREEN_READER | | |
| 60 ACCESSIBILITY_MODE_FLAG_HTML; | |
| 61 | |
| 62 const AccessibilityMode ACCESSIBILITY_MODE_WEB_CONTENTS_ONLY = | |
| 63 ACCESSIBILITY_MODE_FLAG_WEB_CONTENTS | | |
| 64 ACCESSIBILITY_MODE_FLAG_INLINE_TEXT_BOXES | | |
| 65 ACCESSIBILITY_MODE_FLAG_SCREEN_READER | | |
| 66 ACCESSIBILITY_MODE_FLAG_HTML; | |
| 67 | |
| 68 #endif // CONTENT_COMMON_ACCESSIBILITY_MODE_ENUMS_H_ | |
| OLD | NEW |