| Index: content/common/accessibility_mode_enums.h
|
| diff --git a/content/common/accessibility_mode_enums.h b/content/common/accessibility_mode_enums.h
|
| index ae059f264140ebee1b496ba581f2e4d064405377..46f8b4bb1eddcf1258f0423165f7e3d8c353cb5d 100644
|
| --- a/content/common/accessibility_mode_enums.h
|
| +++ b/content/common/accessibility_mode_enums.h
|
| @@ -8,27 +8,61 @@
|
| // Note: keep enums in content/browser/resources/accessibility/accessibility.js
|
| // in sync with these two enums.
|
| enum AccessibilityModeFlag {
|
| - // Accessibility updates are processed to create platform trees and events are
|
| - // passed to platform APIs in the browser.
|
| - AccessibilityModeFlagPlatform = 1 << 0,
|
| -
|
| - // Accessibility is on, and the full tree is computed. If this flag is off,
|
| - // only limited information about editable text nodes is sent to the browser
|
| - // process. Useful for implementing limited UIA on tablets.
|
| - AccessibilityModeFlagFullTree = 1 << 1,
|
| -};
|
| + // Native accessibility APIs, specific to each platform, are enabled.
|
| + // When this flag is set that indicates the presence of a third-party
|
| + // client accessing Chrome via accessibility APIs. However, unless one
|
| + // of the flags below is set, the contents of web pages will not be
|
| + // accessible.
|
| + ACCESSIBILITY_MODE_FLAG_NATIVE_APIS = 1 << 0,
|
| +
|
| + // The renderer process will generate an accessibility tree containing
|
| + // basic information about all nodes, including role, name, value,
|
| + // state, and location. This is the minimum flag required in order for
|
| + // web contents to be accessible, and the remaining flags are meaningless
|
| + // unless this one is set.
|
| + //
|
| + // Note that sometimes this flag will be set when
|
| + // ACCESSIBILITY_MODE_FLAG_NATIVE_APIS is not, when the content layer embedder
|
| + // is providing accessibility support via some other mechanism other than
|
| + // what's implemented in content/browser.
|
| + ACCESSIBILITY_MODE_FLAG_WEB_CONTENTS = 1 << 1,
|
|
|
| -enum AccessibilityMode {
|
| - // All accessibility is off.
|
| - AccessibilityModeOff = 0,
|
| + // The accessibility tree will contain inline text boxes, which are
|
| + // necessary to expose information about line breaks and word boundaries.
|
| + // Without this flag, you can retrieve the plaintext value of a text field
|
| + // but not the information about how it's broken down into lines.
|
| + //
|
| + // Note that when this flag is off it's still possible to request inline
|
| + // text boxes for a specific node on-demand, asynchronously.
|
| + ACCESSIBILITY_MODE_FLAG_INLINE_TEXT_BOXES = 1 << 2,
|
|
|
| - // Renderer accessibility is on, and platform APIs are called.
|
| - AccessibilityModeComplete =
|
| - AccessibilityModeFlagPlatform | AccessibilityModeFlagFullTree,
|
| + // The accessibility tree will contain extra accessibility
|
| + // attributes typically only needed by screen readers and other
|
| + // assistive technology for blind users. Examples include text style
|
| + // attributes, table cell information, live region properties, range
|
| + // values, and relationship attributes.
|
| + ACCESSIBILITY_MODE_FLAG_SCREEN_READER = 1 << 3,
|
|
|
| - // Renderer accessibility is on, and events are passed to any extensions
|
| - // requesting automation, but not to platform accessibility.
|
| - AccessibilityModeTreeOnly = AccessibilityModeFlagFullTree,
|
| + // The accessibility tree will contain the HTML tag name and HTML attributes
|
| + // for all accessibility nodes that come from web content.
|
| + ACCESSIBILITY_MODE_FLAG_HTML = 1 << 4,
|
| };
|
|
|
| +typedef int AccessibilityMode;
|
| +
|
| +const AccessibilityMode AccessibilityModeOff = 0;
|
| +
|
| +const AccessibilityMode ACCESSIBILITY_MODE_COMPLETE =
|
| + ACCESSIBILITY_MODE_FLAG_NATIVE_APIS |
|
| + ACCESSIBILITY_MODE_FLAG_WEB_CONTENTS |
|
| + ACCESSIBILITY_MODE_FLAG_INLINE_TEXT_BOXES |
|
| + ACCESSIBILITY_MODE_FLAG_SCREEN_READER |
|
| + ACCESSIBILITY_MODE_FLAG_HTML;
|
| +
|
| +const AccessibilityMode ACCESSIBILITY_MODE_WEB_CONTENTS_ONLY =
|
| + ACCESSIBILITY_MODE_FLAG_WEB_CONTENTS |
|
| + ACCESSIBILITY_MODE_FLAG_INLINE_TEXT_BOXES |
|
| + ACCESSIBILITY_MODE_FLAG_SCREEN_READER |
|
| + ACCESSIBILITY_MODE_FLAG_HTML;
|
| +
|
| #endif // CONTENT_COMMON_ACCESSIBILITY_MODE_ENUMS_H_
|
|
|