| <!DOCTYPE html> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| |
| <div id="editable" contenteditable="true"> |
| Hello |
| <div>there</div> |
| </div> |
| |
| <script> |
| test(() => { |
| let editable = accessibilityController.accessibleElementById('editable'); |
| assert_not_equals(editable, null); |
| assert_equals(editable.childrenCount, 2); |
| |
| let staticText = editable.childAtIndex(0); |
| assert_not_equals(staticText, null); |
| assert_equals(staticText.role, 'AXRole: AXStaticText'); |
| assert_equals(staticText.childrenCount, 1); |
| let inlineText = staticText.childAtIndex(0); |
| assert_equals(inlineText.role, 'AXRole: AXInlineTextBox'); |
| assert_equals(inlineText.name, 'Hello'); |
| |
| assert_true(staticText.isEditable); |
| assert_true(staticText.isRichlyEditable); |
| }, 'Ensure that the text content of anonymous blocks inside content editables are not ignored and are marked as editable.'); |
| </script> |