Truly independent web browser
Internals: Dump the accessibility node data the UI process receives
sideshowbarker77e147dee83f
diff --git a/Libraries/LibWeb/Internals/Internals.cpp b/Libraries/LibWeb/Internals/Internals.cppindex 29ce0f300ab..748d165438f 100644--- a/Libraries/LibWeb/Internals/Internals.cpp+++ b/Libraries/LibWeb/Internals/Internals.cpp@@ -1897,6 +1897,178 @@ String Internals::accessibility_character_offsets(GC::Ref<DOM::Node> node)return builder.to_string_without_validation();}+// Dumps the node data in a form that stays the same from run to run: Node IDs become labels in tree order (n0 is the+// dumped node), a reference to a node outside the dumped subtree prints as "outside", and only the fields that differ+// from their defaults print. So a test can compare the data the UI process receives before and after a change.+String Internals::dump_accessibility_node_data(GC::Ref<DOM::Node> node)+{+ auto& document = node->document();+ document.update_layout(DOM::UpdateLayoutReason::InspectAccessibilityTree);+ auto nodes = document.build_accessibility_node_data();++ HashMap<i64, size_t> index_by_id;+ for (size_t i = 0; i < nodes.size(); ++i)+ index_by_id.set(nodes[i].id, i);+ auto root_index = index_by_id.get(static_cast<i64>(node->unique_id().value()));+ if (!root_index.has_value())+ return "(not in the accessibility tree)"_string;++ // Label the subtree's nodes in tree order.+ HashMap<i64, size_t> label_by_id;+ Vector<size_t> order;+ Vector<size_t> depths;+ auto label = [&](this auto const& self, size_t index, size_t depth) -> void {+ if (label_by_id.contains(nodes[index].id))+ return;+ label_by_id.set(nodes[index].id, label_by_id.size());+ order.append(index);+ depths.append(depth);+ for (auto child_id : nodes[index].child_ids) {+ if (auto child_index = index_by_id.get(child_id); child_index.has_value())+ self(*child_index, depth + 1);+ }+ };+ label(*root_index, 0);++ auto reference = [&](i64 id) -> String {+ if (id == -1)+ return "none"_string;+ if (auto found = label_by_id.get(id); found.has_value())+ return MUST(String::formatted("n{}", *found));+ return "outside"_string;+ };+ auto references = [&](Vector<i64> const& ids) {+ StringBuilder builder;+ for (auto id : ids) {+ if (!builder.is_empty())+ builder.append(' ');+ builder.append(reference(id));+ }+ return builder.to_string_without_validation();+ };+ auto quoted = [](String const& string) {+ StringBuilder builder;+ builder.append('"');+ for (auto code_point : string.code_points()) {+ if (code_point == '"' || code_point == '\\')+ builder.append('\\');+ if (code_point == '\n')+ builder.append("\\n"sv);+ else+ builder.append_code_point(code_point);+ }+ builder.append('"');+ return builder.to_string_without_validation();+ };++ StringBuilder builder;+ for (size_t i = 0; i < order.size(); ++i) {+ auto const& data = nodes[order[i]];+ builder.append_repeated(" "sv, depths[i]);+ builder.appendff("n{} {}", i, data.role.is_empty() ? "(no role)"sv : data.role.bytes_as_string_view());+ auto field = [&](StringView name, auto const& value) { builder.appendff(" {}={}", name, value); };+ if (!data.name.is_empty())+ field("name"sv, quoted(data.name));+ if (!data.description.is_empty())+ field("description"sv, quoted(data.description));+ if (!data.value.is_empty())+ field("value"sv, quoted(data.value));+ if (!data.url.is_empty())+ field("url"sv, quoted(data.url));+ if (!data.language.is_empty())+ field("language"sv, data.language);+ builder.appendff(" bounds={},{} {}x{}", data.bounds.x(), data.bounds.y(), data.bounds.width(), data.bounds.height());+ if (data.is_focused)+ builder.append(" focused"sv);+ if (data.is_disabled)+ builder.append(" disabled"sv);+ if (data.heading_level != 0)+ field("heading_level"sv, data.heading_level);+ if (data.hierarchical_level != 0)+ field("hierarchical_level"sv, data.hierarchical_level);+ if (!data.live.is_empty())+ field("live"sv, data.live);+ if (data.column_span != 1 || data.row_span != 1)+ builder.appendff(" span={}x{}", data.column_span, data.row_span);+ if (data.cell_column_index != -1)+ field("column_index"sv, data.cell_column_index);+ if (data.table_row_count != -1 || data.table_column_count != -1)+ builder.appendff(" table={}x{}", data.table_row_count, data.table_column_count);+ if (data.table_caption_id != -1)+ field("caption"sv, reference(data.table_caption_id));+ if (!data.table_summary.is_empty())+ field("summary"sv, quoted(data.table_summary));+ if (!data.column_header_ids.is_empty())+ builder.appendff(" column_headers=[{}]", references(data.column_header_ids));+ if (!data.row_header_ids.is_empty())+ builder.appendff(" row_headers=[{}]", references(data.row_header_ids));+ if (!data.keybinding.is_empty())+ field("keybinding"sv, quoted(data.keybinding));+ if (data.value_numeric.has_value())+ field("value_now"sv, *data.value_numeric);+ if (data.value_minimum.has_value())+ field("value_min"sv, *data.value_minimum);+ if (data.value_maximum.has_value())+ field("value_max"sv, *data.value_maximum);+ if (data.value_step.has_value())+ field("value_step"sv, *data.value_step);+ if (data.is_selected)+ builder.append(" selected"sv);+ using CheckedState = WebView::AccessibilityNodeData::CheckedState;+ using ExpandedState = WebView::AccessibilityNodeData::ExpandedState;+ using PressedState = WebView::AccessibilityNodeData::PressedState;+ auto tristate = [](bool is_true, bool is_mixed) {+ if (is_mixed)+ return "mixed"sv;+ return is_true ? "true"sv : "false"sv;+ };+ if (data.checked_state != CheckedState::NotApplicable)+ field("checked"sv, tristate(data.checked_state == CheckedState::Checked, data.checked_state == CheckedState::Mixed));+ if (data.expanded_state != ExpandedState::NotApplicable)+ field("expanded"sv, tristate(data.expanded_state == ExpandedState::Expanded, false));+ if (data.pressed_state != PressedState::NotApplicable)+ field("pressed"sv, tristate(data.pressed_state == PressedState::Pressed, data.pressed_state == PressedState::Mixed));+ auto flag = [&](bool value, StringView name) {+ if (value)+ builder.appendff(" {}", name);+ };+ flag(data.is_editable, "editable"sv);+ flag(data.is_multi_line, "multi_line"sv);+ flag(data.is_password, "password"sv);+ flag(data.is_read_only, "read_only"sv);+ flag(data.is_required, "required"sv);+ flag(data.is_invalid, "invalid"sv);+ flag(data.is_multi_selectable, "multi_selectable"sv);+ flag(data.is_visited, "visited"sv);+ if (data.caret_offset != -1)+ field("caret"sv, data.caret_offset);+ if (data.selection_start != -1 || data.selection_end != -1)+ builder.appendff(" selection={}..{}", data.selection_start, data.selection_end);+ if (!data.font_family.is_empty())+ builder.appendff(" font={} {} {} {}", quoted(data.font_family), data.font_size, data.font_weight, data.font_style);+ if (!data.color.is_empty())+ field("color"sv, data.color);+ if (!data.background_color.is_empty())+ field("background"sv, data.background_color);+ if (!data.text_decoration.is_empty() && data.text_decoration != "none"sv)+ field("decoration"sv, data.text_decoration);+ if (!data.character_offsets.is_empty()) {+ builder.append(" characters="sv);+ for (size_t j = 0; j < data.character_offsets.size(); ++j)+ builder.appendff("{}{},{}", j ? " "sv : ""sv, data.character_offsets[j].x(), data.character_offsets[j].y());+ }+ if (!data.line_break_character_offsets.is_empty()) {+ builder.append(" lines="sv);+ for (size_t j = 0; j < data.line_break_character_offsets.size(); ++j) {+ auto height = j < data.line_heights.size() ? data.line_heights[j] : -1;+ builder.appendff("{}{}@{}", j ? " "sv : ""sv, data.line_break_character_offsets[j], height);+ }+ }+ builder.append('\n');+ }+ return builder.to_string_without_validation();+}+Utf16String Internals::dump_layout_tree(GC::Ref<DOM::Node> node){// The test API's read of the render state of the node's document.diff --git a/Libraries/LibWeb/Internals/Internals.h b/Libraries/LibWeb/Internals/Internals.hindex 73d08007c7e..ae7fcf3d216 100644--- a/Libraries/LibWeb/Internals/Internals.h+++ b/Libraries/LibWeb/Internals/Internals.h@@ -227,6 +227,7 @@ public:Utf16String dump_display_list();Utf16String dump_accessibility_tree();String accessibility_character_offsets(GC::Ref<DOM::Node>);+ String dump_accessibility_node_data(GC::Ref<DOM::Node>);Utf16String dump_layout_tree(GC::Ref<DOM::Node>);Utf16String dump_stacking_context_tree();Utf16String stacking_context_structure_verification_report();diff --git a/Libraries/LibWeb/Internals/Internals.idl b/Libraries/LibWeb/Internals/Internals.idlindex 6460b3e48ab..58c2abc4fa9 100644--- a/Libraries/LibWeb/Internals/Internals.idl+++ b/Libraries/LibWeb/Internals/Internals.idl@@ -229,6 +229,8 @@ interface Internals {DOMString dumpAccessibilityTree();// The per-character offsets that the accessibility tree reports for a text node, as space-separated "x,y" pairs.DOMString accessibilityCharacterOffsets(Node node);+ // The accessibility node data the UI process receives for a node and its exposed descendants, one line per node.+ DOMString dumpAccessibilityNodeData(Node node);DOMString dumpLayoutTree(Node node);DOMString dumpStackingContextTree();DOMString stackingContextStructureVerificationReport();diff --git a/Tests/LibWeb/Text/expected/accessibility-node-data-names.txt b/Tests/LibWeb/Text/expected/accessibility-node-data-names.txtnew file mode 100644index 00000000000..e1a7fc79a13--- /dev/null+++ b/Tests/LibWeb/Text/expected/accessibility-node-data-names.txt@@ -0,0 +1,249 @@+== initial+n0 generic bounds=8,8 784x118+ n1 table bounds=8,8 72x26 table=1x1 column_headers=[none] row_headers=[none]+ n2 rowgroup bounds=10,10 68x22+ n3 row name="cell text" bounds=10,10 68x22+ n4 cell name="cell text" bounds=10,10 68x22 column_index=0+ n5 text leaf name="cell text" bounds=11,13 66x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 17,0 21,0 26,0 34,0 40,0 49,0 59,0 lines=0@16+ n6 button name="hidden label" bounds=8,34 95x20+ n7 text leaf name="button text" bounds=17,37 77x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 16,0 21,0 27,0 36,0 44,0 50,0 56,0 63,0 71,0 lines=0@14+ n8 button name="inner text" bounds=111,34 85x20+ n9 generic bounds=120,37 67x14+ n10 text leaf name="inner text" bounds=120,37 67x14 font="SerenitySans" 13.328125 400 normal color=#000000 characters=0,0 3,0 11,0 19,0 27,0 34,0 41,0 46,0 54,0 62,0 lines=0@14+ n11 text leaf name="field label" bounds=205,36 75x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 23,0 31,0 39,0 44,0 53,0 62,0 71,0 lines=0@16+ n12 textbox name="field label" bounds=289,34 169x20 editable+ n13 paragraph description="first description" bounds=8,70 784x20+ n14 text leaf name="described" bounds=8,72 74x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 7,0 16,0 25,0 34,0 43,0 48,0 57,0 66,0 lines=0@16+ n15 generic bounds=8,108 133x16+ n16 text leaf name="first description" bounds=8,108 133x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 29,0 36,0 44,0 51,0 60,0 69,0 78,0 87,0 92,0 101,0 108,0 113,0 123,0 lines=0@16+ n17 button name="pending" bounds=149,106 65x20+ n18 text leaf name="pending" bounds=158,109 47x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 15,0 23,0 29,0 33,0 41,0 lines=0@14+ n19 button name="generated" bounds=222,106 81x20+ n20 text leaf name="generated" bounds=231,109 63x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 6,0 13,0 21,0 28,0 36,0 43,0 49,0 56,0 lines=0@14++== cell textContent+n0 generic bounds=8,8 784x118+ n1 table bounds=8,8 109x26 table=1x1 column_headers=[none] row_headers=[none]+ n2 rowgroup bounds=10,10 105x22+ n3 row name="new cell text" bounds=10,10 105x22+ n4 cell name="new cell text" bounds=10,10 105x22 column_index=0+ n5 text leaf name="new cell text" bounds=11,13 103x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 29,0 37,0 46,0 55,0 59,0 63,0 71,0 78,0 87,0 96,0 lines=0@16+ n6 button name="hidden label" bounds=8,34 95x20+ n7 text leaf name="button text" bounds=17,37 77x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 16,0 21,0 27,0 36,0 44,0 50,0 56,0 63,0 71,0 lines=0@14+ n8 button name="inner text" bounds=111,34 85x20+ n9 generic bounds=120,37 67x14+ n10 text leaf name="inner text" bounds=120,37 67x14 font="SerenitySans" 13.328125 400 normal color=#000000 characters=0,0 3,0 11,0 19,0 27,0 34,0 41,0 46,0 54,0 62,0 lines=0@14+ n11 text leaf name="field label" bounds=205,36 75x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 23,0 31,0 39,0 44,0 53,0 62,0 71,0 lines=0@16+ n12 textbox name="field label" bounds=289,34 169x20 editable+ n13 paragraph description="first description" bounds=8,70 784x20+ n14 text leaf name="described" bounds=8,72 74x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 7,0 16,0 25,0 34,0 43,0 48,0 57,0 66,0 lines=0@16+ n15 generic bounds=8,108 133x16+ n16 text leaf name="first description" bounds=8,108 133x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 29,0 36,0 44,0 51,0 60,0 69,0 78,0 87,0 92,0 101,0 108,0 113,0 123,0 lines=0@16+ n17 button name="pending" bounds=149,106 65x20+ n18 text leaf name="pending" bounds=158,109 47x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 15,0 23,0 29,0 33,0 41,0 lines=0@14+ n19 button name="generated" bounds=222,106 81x20+ n20 text leaf name="generated" bounds=231,109 63x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 6,0 13,0 21,0 28,0 36,0 43,0 49,0 56,0 lines=0@14++== cell Text.data+n0 generic bounds=8,8 784x118+ n1 table bounds=8,8 124x26 table=1x1 column_headers=[none] row_headers=[none]+ n2 rowgroup bounds=10,10 120x22+ n3 row name="edited cell text" bounds=10,10 120x22+ n4 cell name="edited cell text" bounds=10,10 120x22 column_index=0+ n5 text leaf name="edited cell text" bounds=11,13 118x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 16,0 21,0 28,0 36,0 44,0 52,0 61,0 70,0 74,0 78,0 86,0 93,0 102,0 111,0 lines=0@16+ n6 button name="hidden label" bounds=8,34 95x20+ n7 text leaf name="button text" bounds=17,37 77x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 16,0 21,0 27,0 36,0 44,0 50,0 56,0 63,0 71,0 lines=0@14+ n8 button name="inner text" bounds=111,34 85x20+ n9 generic bounds=120,37 67x14+ n10 text leaf name="inner text" bounds=120,37 67x14 font="SerenitySans" 13.328125 400 normal color=#000000 characters=0,0 3,0 11,0 19,0 27,0 34,0 41,0 46,0 54,0 62,0 lines=0@14+ n11 text leaf name="field label" bounds=205,36 75x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 23,0 31,0 39,0 44,0 53,0 62,0 71,0 lines=0@16+ n12 textbox name="field label" bounds=289,34 169x20 editable+ n13 paragraph description="first description" bounds=8,70 784x20+ n14 text leaf name="described" bounds=8,72 74x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 7,0 16,0 25,0 34,0 43,0 48,0 57,0 66,0 lines=0@16+ n15 generic bounds=8,108 133x16+ n16 text leaf name="first description" bounds=8,108 133x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 29,0 36,0 44,0 51,0 60,0 69,0 78,0 87,0 92,0 101,0 108,0 113,0 123,0 lines=0@16+ n17 button name="pending" bounds=149,106 65x20+ n18 text leaf name="pending" bounds=158,109 47x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 15,0 23,0 29,0 33,0 41,0 lines=0@14+ n19 button name="generated" bounds=222,106 81x20+ n20 text leaf name="generated" bounds=231,109 63x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 6,0 13,0 21,0 28,0 36,0 43,0 49,0 56,0 lines=0@14++== hidden aria-labelledby target+n0 generic bounds=8,8 784x118+ n1 table bounds=8,8 124x26 table=1x1 column_headers=[none] row_headers=[none]+ n2 rowgroup bounds=10,10 120x22+ n3 row name="edited cell text" bounds=10,10 120x22+ n4 cell name="edited cell text" bounds=10,10 120x22 column_index=0+ n5 text leaf name="edited cell text" bounds=11,13 118x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 16,0 21,0 28,0 36,0 44,0 52,0 61,0 70,0 74,0 78,0 86,0 93,0 102,0 111,0 lines=0@16+ n6 button name="new hidden label" bounds=8,34 95x20+ n7 text leaf name="button text" bounds=17,37 77x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 16,0 21,0 27,0 36,0 44,0 50,0 56,0 63,0 71,0 lines=0@14+ n8 button name="inner text" bounds=111,34 85x20+ n9 generic bounds=120,37 67x14+ n10 text leaf name="inner text" bounds=120,37 67x14 font="SerenitySans" 13.328125 400 normal color=#000000 characters=0,0 3,0 11,0 19,0 27,0 34,0 41,0 46,0 54,0 62,0 lines=0@14+ n11 text leaf name="field label" bounds=205,36 75x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 23,0 31,0 39,0 44,0 53,0 62,0 71,0 lines=0@16+ n12 textbox name="field label" bounds=289,34 169x20 editable+ n13 paragraph description="first description" bounds=8,70 784x20+ n14 text leaf name="described" bounds=8,72 74x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 7,0 16,0 25,0 34,0 43,0 48,0 57,0 66,0 lines=0@16+ n15 generic bounds=8,108 133x16+ n16 text leaf name="first description" bounds=8,108 133x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 29,0 36,0 44,0 51,0 60,0 69,0 78,0 87,0 92,0 101,0 108,0 113,0 123,0 lines=0@16+ n17 button name="pending" bounds=149,106 65x20+ n18 text leaf name="pending" bounds=158,109 47x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 15,0 23,0 29,0 33,0 41,0 lines=0@14+ n19 button name="generated" bounds=222,106 81x20+ n20 text leaf name="generated" bounds=231,109 63x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 6,0 13,0 21,0 28,0 36,0 43,0 49,0 56,0 lines=0@14++== name from content+n0 generic bounds=8,8 784x118+ n1 table bounds=8,8 124x26 table=1x1 column_headers=[none] row_headers=[none]+ n2 rowgroup bounds=10,10 120x22+ n3 row name="edited cell text" bounds=10,10 120x22+ n4 cell name="edited cell text" bounds=10,10 120x22 column_index=0+ n5 text leaf name="edited cell text" bounds=11,13 118x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 16,0 21,0 28,0 36,0 44,0 52,0 61,0 70,0 74,0 78,0 86,0 93,0 102,0 111,0 lines=0@16+ n6 button name="new hidden label" bounds=8,34 95x20+ n7 text leaf name="button text" bounds=17,37 77x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 16,0 21,0 27,0 36,0 44,0 50,0 56,0 63,0 71,0 lines=0@14+ n8 button name="new inner text" bounds=111,34 117x20+ n9 generic bounds=120,37 99x14+ n10 text leaf name="new inner text" bounds=120,37 99x14 font="SerenitySans" 13.328125 400 normal color=#000000 characters=0,0 8,0 15,0 24,0 31,0 35,0 43,0 51,0 58,0 65,0 72,0 78,0 85,0 93,0 lines=0@14+ n11 text leaf name="field label" bounds=236,36 75x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 23,0 31,0 39,0 44,0 53,0 62,0 71,0 lines=0@16+ n12 textbox name="field label" bounds=320,34 169x20 editable+ n13 paragraph description="first description" bounds=8,70 784x20+ n14 text leaf name="described" bounds=8,72 74x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 7,0 16,0 25,0 34,0 43,0 48,0 57,0 66,0 lines=0@16+ n15 generic bounds=8,108 133x16+ n16 text leaf name="first description" bounds=8,108 133x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 29,0 36,0 44,0 51,0 60,0 69,0 78,0 87,0 92,0 101,0 108,0 113,0 123,0 lines=0@16+ n17 button name="pending" bounds=149,106 65x20+ n18 text leaf name="pending" bounds=158,109 47x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 15,0 23,0 29,0 33,0 41,0 lines=0@14+ n19 button name="generated" bounds=222,106 81x20+ n20 text leaf name="generated" bounds=231,109 63x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 6,0 13,0 21,0 28,0 36,0 43,0 49,0 56,0 lines=0@14++== label text+n0 generic bounds=8,8 784x118+ n1 table bounds=8,8 124x26 table=1x1 column_headers=[none] row_headers=[none]+ n2 rowgroup bounds=10,10 120x22+ n3 row name="edited cell text" bounds=10,10 120x22+ n4 cell name="edited cell text" bounds=10,10 120x22 column_index=0+ n5 text leaf name="edited cell text" bounds=11,13 118x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 16,0 21,0 28,0 36,0 44,0 52,0 61,0 70,0 74,0 78,0 86,0 93,0 102,0 111,0 lines=0@16+ n6 button name="new hidden label" bounds=8,34 95x20+ n7 text leaf name="button text" bounds=17,37 77x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 16,0 21,0 27,0 36,0 44,0 50,0 56,0 63,0 71,0 lines=0@14+ n8 button name="new inner text" bounds=111,34 117x20+ n9 generic bounds=120,37 99x14+ n10 text leaf name="new inner text" bounds=120,37 99x14 font="SerenitySans" 13.328125 400 normal color=#000000 characters=0,0 8,0 15,0 24,0 31,0 35,0 43,0 51,0 58,0 65,0 72,0 78,0 85,0 93,0 lines=0@14+ n11 text leaf name="new field label" bounds=236,36 113x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 29,0 37,0 43,0 48,0 57,0 61,0 69,0 77,0 81,0 90,0 100,0 109,0 lines=0@16+ n12 textbox name="new field label" bounds=358,34 169x20 editable+ n13 paragraph description="first description" bounds=8,70 784x20+ n14 text leaf name="described" bounds=8,72 74x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 7,0 16,0 25,0 34,0 43,0 48,0 57,0 66,0 lines=0@16+ n15 generic bounds=8,108 133x16+ n16 text leaf name="first description" bounds=8,108 133x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 29,0 36,0 44,0 51,0 60,0 69,0 78,0 87,0 92,0 101,0 108,0 113,0 123,0 lines=0@16+ n17 button name="pending" bounds=149,106 65x20+ n18 text leaf name="pending" bounds=158,109 47x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 15,0 23,0 29,0 33,0 41,0 lines=0@14+ n19 button name="generated" bounds=222,106 81x20+ n20 text leaf name="generated" bounds=231,109 63x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 6,0 13,0 21,0 28,0 36,0 43,0 49,0 56,0 lines=0@14++== aria-label+n0 generic bounds=8,8 784x118+ n1 table bounds=8,8 124x26 table=1x1 column_headers=[none] row_headers=[none]+ n2 rowgroup bounds=10,10 120x22+ n3 row name="edited cell text" bounds=10,10 120x22+ n4 cell name="edited cell text" bounds=10,10 120x22 column_index=0+ n5 text leaf name="edited cell text" bounds=11,13 118x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 16,0 21,0 28,0 36,0 44,0 52,0 61,0 70,0 74,0 78,0 86,0 93,0 102,0 111,0 lines=0@16+ n6 button name="new hidden label" bounds=8,34 95x20+ n7 text leaf name="button text" bounds=17,37 77x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 16,0 21,0 27,0 36,0 44,0 50,0 56,0 63,0 71,0 lines=0@14+ n8 button name="new inner text" bounds=111,34 117x20+ n9 generic bounds=120,37 99x14+ n10 text leaf name="new inner text" bounds=120,37 99x14 font="SerenitySans" 13.328125 400 normal color=#000000 characters=0,0 8,0 15,0 24,0 31,0 35,0 43,0 51,0 58,0 65,0 72,0 78,0 85,0 93,0 lines=0@14+ n11 text leaf name="new field label" bounds=236,36 113x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 29,0 37,0 43,0 48,0 57,0 61,0 69,0 77,0 81,0 90,0 100,0 109,0 lines=0@16+ n12 textbox name="explicit label" bounds=358,34 169x20 editable+ n13 paragraph description="first description" bounds=8,70 784x20+ n14 text leaf name="described" bounds=8,72 74x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 7,0 16,0 25,0 34,0 43,0 48,0 57,0 66,0 lines=0@16+ n15 generic bounds=8,108 133x16+ n16 text leaf name="first description" bounds=8,108 133x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 29,0 36,0 44,0 51,0 60,0 69,0 78,0 87,0 92,0 101,0 108,0 113,0 123,0 lines=0@16+ n17 button name="pending" bounds=149,106 65x20+ n18 text leaf name="pending" bounds=158,109 47x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 15,0 23,0 29,0 33,0 41,0 lines=0@14+ n19 button name="generated" bounds=222,106 81x20+ n20 text leaf name="generated" bounds=231,109 63x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 6,0 13,0 21,0 28,0 36,0 43,0 49,0 56,0 lines=0@14++== aria-describedby target+n0 generic bounds=8,8 784x118+ n1 table bounds=8,8 124x26 table=1x1 column_headers=[none] row_headers=[none]+ n2 rowgroup bounds=10,10 120x22+ n3 row name="edited cell text" bounds=10,10 120x22+ n4 cell name="edited cell text" bounds=10,10 120x22 column_index=0+ n5 text leaf name="edited cell text" bounds=11,13 118x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 16,0 21,0 28,0 36,0 44,0 52,0 61,0 70,0 74,0 78,0 86,0 93,0 102,0 111,0 lines=0@16+ n6 button name="new hidden label" bounds=8,34 95x20+ n7 text leaf name="button text" bounds=17,37 77x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 16,0 21,0 27,0 36,0 44,0 50,0 56,0 63,0 71,0 lines=0@14+ n8 button name="new inner text" bounds=111,34 117x20+ n9 generic bounds=120,37 99x14+ n10 text leaf name="new inner text" bounds=120,37 99x14 font="SerenitySans" 13.328125 400 normal color=#000000 characters=0,0 8,0 15,0 24,0 31,0 35,0 43,0 51,0 58,0 65,0 72,0 78,0 85,0 93,0 lines=0@14+ n11 text leaf name="new field label" bounds=236,36 113x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 29,0 37,0 43,0 48,0 57,0 61,0 69,0 77,0 81,0 90,0 100,0 109,0 lines=0@16+ n12 textbox name="explicit label" bounds=358,34 169x20 editable+ n13 paragraph description="second description" bounds=8,70 784x20+ n14 text leaf name="described" bounds=8,72 74x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 7,0 16,0 25,0 34,0 43,0 48,0 57,0 66,0 lines=0@16+ n15 generic bounds=8,108 151x16+ n16 text leaf name="second description" bounds=8,108 151x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 26,0 37,0 46,0 54,0 62,0 70,0 79,0 88,0 97,0 106,0 110,0 120,0 127,0 131,0 142,0 lines=0@16+ n17 button name="pending" bounds=167,106 65x20+ n18 text leaf name="pending" bounds=176,109 47x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 15,0 23,0 29,0 33,0 41,0 lines=0@14+ n19 button name="generated" bounds=241,106 81x20+ n20 text leaf name="generated" bounds=250,109 63x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 6,0 13,0 21,0 28,0 36,0 43,0 49,0 56,0 lines=0@14++== id appears for a pending reference+n0 generic bounds=8,8 784x118+ n1 table bounds=8,8 124x26 table=1x1 column_headers=[none] row_headers=[none]+ n2 rowgroup bounds=10,10 120x22+ n3 row name="edited cell text" bounds=10,10 120x22+ n4 cell name="edited cell text" bounds=10,10 120x22 column_index=0+ n5 text leaf name="edited cell text" bounds=11,13 118x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 16,0 21,0 28,0 36,0 44,0 52,0 61,0 70,0 74,0 78,0 86,0 93,0 102,0 111,0 lines=0@16+ n6 button name="new hidden label" bounds=8,34 95x20+ n7 text leaf name="button text" bounds=17,37 77x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 16,0 21,0 27,0 36,0 44,0 50,0 56,0 63,0 71,0 lines=0@14+ n8 button name="new inner text" bounds=111,34 117x20+ n9 generic bounds=120,37 99x14+ n10 text leaf name="new inner text" bounds=120,37 99x14 font="SerenitySans" 13.328125 400 normal color=#000000 characters=0,0 8,0 15,0 24,0 31,0 35,0 43,0 51,0 58,0 65,0 72,0 78,0 85,0 93,0 lines=0@14+ n11 text leaf name="new field label" bounds=236,36 113x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 29,0 37,0 43,0 48,0 57,0 61,0 69,0 77,0 81,0 90,0 100,0 109,0 lines=0@16+ n12 textbox name="explicit label" bounds=358,34 169x20 editable+ n13 paragraph bounds=8,70 784x20+ n14 text leaf name="described" bounds=8,72 74x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 7,0 16,0 25,0 34,0 43,0 48,0 57,0 66,0 lines=0@16+ n15 generic bounds=8,108 151x16+ n16 text leaf name="second description" bounds=8,108 151x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 26,0 37,0 46,0 54,0 62,0 70,0 79,0 88,0 97,0 106,0 110,0 120,0 127,0 131,0 142,0 lines=0@16+ n17 button name="second description" bounds=167,106 65x20+ n18 text leaf name="pending" bounds=176,109 47x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 15,0 23,0 29,0 33,0 41,0 lines=0@14+ n19 button name="generated" bounds=241,106 81x20+ n20 text leaf name="generated" bounds=250,109 63x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 6,0 13,0 21,0 28,0 36,0 43,0 49,0 56,0 lines=0@14++== referenced id removed+n0 generic bounds=8,8 784x118+ n1 table bounds=8,8 124x26 table=1x1 column_headers=[none] row_headers=[none]+ n2 rowgroup bounds=10,10 120x22+ n3 row name="edited cell text" bounds=10,10 120x22+ n4 cell name="edited cell text" bounds=10,10 120x22 column_index=0+ n5 text leaf name="edited cell text" bounds=11,13 118x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 16,0 21,0 28,0 36,0 44,0 52,0 61,0 70,0 74,0 78,0 86,0 93,0 102,0 111,0 lines=0@16+ n6 button name="new hidden label" bounds=8,34 95x20+ n7 text leaf name="button text" bounds=17,37 77x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 16,0 21,0 27,0 36,0 44,0 50,0 56,0 63,0 71,0 lines=0@14+ n8 button name="new inner text" bounds=111,34 117x20+ n9 generic bounds=120,37 99x14+ n10 text leaf name="new inner text" bounds=120,37 99x14 font="SerenitySans" 13.328125 400 normal color=#000000 characters=0,0 8,0 15,0 24,0 31,0 35,0 43,0 51,0 58,0 65,0 72,0 78,0 85,0 93,0 lines=0@14+ n11 text leaf name="new field label" bounds=236,36 113x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 29,0 37,0 43,0 48,0 57,0 61,0 69,0 77,0 81,0 90,0 100,0 109,0 lines=0@16+ n12 textbox name="explicit label" bounds=358,34 169x20 editable+ n13 paragraph bounds=8,70 784x20+ n14 text leaf name="described" bounds=8,72 74x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 7,0 16,0 25,0 34,0 43,0 48,0 57,0 66,0 lines=0@16+ n15 button name="pending" bounds=8,106 65x20+ n16 text leaf name="pending" bounds=17,109 47x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 15,0 23,0 29,0 33,0 41,0 lines=0@14+ n17 button name="generated" bounds=81,106 81x20+ n18 text leaf name="generated" bounds=90,109 63x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 6,0 13,0 21,0 28,0 36,0 43,0 49,0 56,0 lines=0@14++== generated content+n0 generic bounds=8,8 784x118+ n1 table bounds=8,8 124x26 table=1x1 column_headers=[none] row_headers=[none]+ n2 rowgroup bounds=10,10 120x22+ n3 row name="edited cell text" bounds=10,10 120x22+ n4 cell name="edited cell text" bounds=10,10 120x22 column_index=0+ n5 text leaf name="edited cell text" bounds=11,13 118x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 16,0 21,0 28,0 36,0 44,0 52,0 61,0 70,0 74,0 78,0 86,0 93,0 102,0 111,0 lines=0@16+ n6 button name="new hidden label" bounds=8,34 95x20+ n7 text leaf name="button text" bounds=17,37 77x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 16,0 21,0 27,0 36,0 44,0 50,0 56,0 63,0 71,0 lines=0@14+ n8 button name="new inner text" bounds=111,34 117x20+ n9 generic bounds=120,37 99x14+ n10 text leaf name="new inner text" bounds=120,37 99x14 font="SerenitySans" 13.328125 400 normal color=#000000 characters=0,0 8,0 15,0 24,0 31,0 35,0 43,0 51,0 58,0 65,0 72,0 78,0 85,0 93,0 lines=0@14+ n11 text leaf name="new field label" bounds=236,36 113x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 29,0 37,0 43,0 48,0 57,0 61,0 69,0 77,0 81,0 90,0 100,0 109,0 lines=0@16+ n12 textbox name="explicit label" bounds=358,34 169x20 editable+ n13 paragraph bounds=8,70 784x20+ n14 text leaf name="described" bounds=8,72 74x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 7,0 16,0 25,0 34,0 43,0 48,0 57,0 66,0 lines=0@16+ n15 button name="pending" bounds=8,106 65x20+ n16 text leaf name="pending" bounds=17,109 47x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 7,0 15,0 23,0 29,0 33,0 41,0 lines=0@14+ n17 button name="Before generated" bounds=81,106 131x20+ n18 text leaf name="generated" bounds=141,109 63x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 6,0 13,0 21,0 28,0 36,0 43,0 49,0 56,0 lines=0@14+diff --git a/Tests/LibWeb/Text/expected/accessibility-node-data-states.txt b/Tests/LibWeb/Text/expected/accessibility-node-data-states.txtnew file mode 100644index 00000000000..4d74007ac69--- /dev/null+++ b/Tests/LibWeb/Text/expected/accessibility-node-data-states.txt@@ -0,0 +1,165 @@+== initial+n0 generic bounds=8,8 784x136+ n1 textbox value="initial value" bounds=8,13 169x20 editable+ n2 checkbox bounds=189,11 13x13 checked=false+ n3 combobox bounds=213,13 83x20+ n4 option name="first" bounds=213,13 83x20 selected+ n5 option name="second" bounds=213,13 83x20+ n6 group bounds=10,33 780x39+ n7 button name="in fieldset" bounds=24,40 83x20+ n8 text leaf name="in fieldset" bounds=33,43 65x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 3,0 11,0 18,0 23,0 27,0 34,0 38,0 44,0 52,0 60,0 lines=0@14+ n9 paragraph bounds=8,88 784x20+ n10 text leaf name="selectable paragraph" bounds=8,90 167x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 22,0 31,0 39,0 46,0 56,0 65,0 69,0 78,0 86,0 95,0 105,0 114,0 123,0 131,0 139,0 149,0 158,0 lines=0@16+ n11 button name="toggle" bounds=8,124 55x20 expanded=false pressed=false+ n12 text leaf name="toggle" bounds=17,127 37x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 5,0 14,0 20,0 26,0 30,0 lines=0@14++== value property+n0 generic bounds=8,8 784x136+ n1 textbox value="typed value" bounds=8,13 169x20 editable+ n2 checkbox bounds=189,11 13x13 checked=false+ n3 combobox bounds=213,13 83x20+ n4 option name="first" bounds=213,13 83x20 selected+ n5 option name="second" bounds=213,13 83x20+ n6 group bounds=10,33 780x39+ n7 button name="in fieldset" bounds=24,40 83x20+ n8 text leaf name="in fieldset" bounds=33,43 65x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 3,0 11,0 18,0 23,0 27,0 34,0 38,0 44,0 52,0 60,0 lines=0@14+ n9 paragraph bounds=8,88 784x20+ n10 text leaf name="selectable paragraph" bounds=8,90 167x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 22,0 31,0 39,0 46,0 56,0 65,0 69,0 78,0 86,0 95,0 105,0 114,0 123,0 131,0 139,0 149,0 158,0 lines=0@16+ n11 button name="toggle" bounds=8,124 55x20 expanded=false pressed=false+ n12 text leaf name="toggle" bounds=17,127 37x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 5,0 14,0 20,0 26,0 30,0 lines=0@14++== checked property+n0 generic bounds=8,8 784x136+ n1 textbox value="typed value" bounds=8,13 169x20 editable+ n2 checkbox bounds=189,11 13x13 checked=true+ n3 combobox bounds=213,13 83x20+ n4 option name="first" bounds=213,13 83x20 selected+ n5 option name="second" bounds=213,13 83x20+ n6 group bounds=10,33 780x39+ n7 button name="in fieldset" bounds=24,40 83x20+ n8 text leaf name="in fieldset" bounds=33,43 65x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 3,0 11,0 18,0 23,0 27,0 34,0 38,0 44,0 52,0 60,0 lines=0@14+ n9 paragraph bounds=8,88 784x20+ n10 text leaf name="selectable paragraph" bounds=8,90 167x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 22,0 31,0 39,0 46,0 56,0 65,0 69,0 78,0 86,0 95,0 105,0 114,0 123,0 131,0 139,0 149,0 158,0 lines=0@16+ n11 button name="toggle" bounds=8,124 55x20 expanded=false pressed=false+ n12 text leaf name="toggle" bounds=17,127 37x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 5,0 14,0 20,0 26,0 30,0 lines=0@14++== indeterminate property+n0 generic bounds=8,8 784x136+ n1 textbox value="typed value" bounds=8,13 169x20 editable+ n2 checkbox bounds=189,11 13x13 checked=mixed+ n3 combobox bounds=213,13 83x20+ n4 option name="first" bounds=213,13 83x20 selected+ n5 option name="second" bounds=213,13 83x20+ n6 group bounds=10,33 780x39+ n7 button name="in fieldset" bounds=24,40 83x20+ n8 text leaf name="in fieldset" bounds=33,43 65x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 3,0 11,0 18,0 23,0 27,0 34,0 38,0 44,0 52,0 60,0 lines=0@14+ n9 paragraph bounds=8,88 784x20+ n10 text leaf name="selectable paragraph" bounds=8,90 167x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 22,0 31,0 39,0 46,0 56,0 65,0 69,0 78,0 86,0 95,0 105,0 114,0 123,0 131,0 139,0 149,0 158,0 lines=0@16+ n11 button name="toggle" bounds=8,124 55x20 expanded=false pressed=false+ n12 text leaf name="toggle" bounds=17,127 37x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 5,0 14,0 20,0 26,0 30,0 lines=0@14++== option selected+n0 generic bounds=8,8 784x136+ n1 textbox value="typed value" bounds=8,13 169x20 editable+ n2 checkbox bounds=189,11 13x13 checked=mixed+ n3 combobox bounds=213,13 83x20+ n4 option name="first" bounds=213,13 83x20+ n5 option name="second" bounds=213,13 83x20 selected+ n6 group bounds=10,33 780x39+ n7 button name="in fieldset" bounds=24,40 83x20+ n8 text leaf name="in fieldset" bounds=33,43 65x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 3,0 11,0 18,0 23,0 27,0 34,0 38,0 44,0 52,0 60,0 lines=0@14+ n9 paragraph bounds=8,88 784x20+ n10 text leaf name="selectable paragraph" bounds=8,90 167x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 22,0 31,0 39,0 46,0 56,0 65,0 69,0 78,0 86,0 95,0 105,0 114,0 123,0 131,0 139,0 149,0 158,0 lines=0@16+ n11 button name="toggle" bounds=8,124 55x20 expanded=false pressed=false+ n12 text leaf name="toggle" bounds=17,127 37x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 5,0 14,0 20,0 26,0 30,0 lines=0@14++== fieldset disabled+n0 generic bounds=8,8 784x136+ n1 textbox value="typed value" bounds=8,13 169x20 editable+ n2 checkbox bounds=189,11 13x13 checked=mixed+ n3 combobox bounds=213,13 83x20+ n4 option name="first" bounds=213,13 83x20+ n5 option name="second" bounds=213,13 83x20 selected+ n6 group bounds=10,33 780x39 disabled+ n7 button name="in fieldset" bounds=24,40 83x20 disabled+ n8 text leaf name="in fieldset" bounds=33,43 65x14 font="SerenitySans" 13.328125 400 normal color=#808080 background=#efefef characters=0,0 3,0 11,0 18,0 23,0 27,0 34,0 38,0 44,0 52,0 60,0 lines=0@14+ n9 paragraph bounds=8,88 784x20+ n10 text leaf name="selectable paragraph" bounds=8,90 167x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 22,0 31,0 39,0 46,0 56,0 65,0 69,0 78,0 86,0 95,0 105,0 114,0 123,0 131,0 139,0 149,0 158,0 lines=0@16+ n11 button name="toggle" bounds=8,124 55x20 expanded=false pressed=false+ n12 text leaf name="toggle" bounds=17,127 37x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 5,0 14,0 20,0 26,0 30,0 lines=0@14++== focus+n0 generic bounds=8,8 784x136+ n1 textbox value="typed value" bounds=8,13 169x20 focused editable+ n2 checkbox bounds=189,11 13x13 checked=mixed+ n3 combobox bounds=213,13 83x20+ n4 option name="first" bounds=213,13 83x20+ n5 option name="second" bounds=213,13 83x20 selected+ n6 group bounds=10,33 780x39 disabled+ n7 button name="in fieldset" bounds=24,40 83x20 disabled+ n8 text leaf name="in fieldset" bounds=33,43 65x14 font="SerenitySans" 13.328125 400 normal color=#808080 background=#efefef characters=0,0 3,0 11,0 18,0 23,0 27,0 34,0 38,0 44,0 52,0 60,0 lines=0@14+ n9 paragraph bounds=8,88 784x20+ n10 text leaf name="selectable paragraph" bounds=8,90 167x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 22,0 31,0 39,0 46,0 56,0 65,0 69,0 78,0 86,0 95,0 105,0 114,0 123,0 131,0 139,0 149,0 158,0 lines=0@16+ n11 button name="toggle" bounds=8,124 55x20 expanded=false pressed=false+ n12 text leaf name="toggle" bounds=17,127 37x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 5,0 14,0 20,0 26,0 30,0 lines=0@14++== focus moved+n0 generic bounds=8,8 784x136+ n1 textbox value="typed value" bounds=8,13 169x20 editable+ n2 checkbox bounds=189,11 13x13 checked=mixed+ n3 combobox bounds=213,13 83x20+ n4 option name="first" bounds=213,13 83x20+ n5 option name="second" bounds=213,13 83x20 selected+ n6 group bounds=10,33 780x39 disabled+ n7 button name="in fieldset" bounds=24,40 83x20 disabled+ n8 text leaf name="in fieldset" bounds=33,43 65x14 font="SerenitySans" 13.328125 400 normal color=#808080 background=#efefef characters=0,0 3,0 11,0 18,0 23,0 27,0 34,0 38,0 44,0 52,0 60,0 lines=0@14+ n9 paragraph bounds=8,88 784x20+ n10 text leaf name="selectable paragraph" bounds=8,90 167x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 22,0 31,0 39,0 46,0 56,0 65,0 69,0 78,0 86,0 95,0 105,0 114,0 123,0 131,0 139,0 149,0 158,0 lines=0@16+ n11 button name="toggle" bounds=8,124 55x20 focused expanded=false pressed=false+ n12 text leaf name="toggle" bounds=17,127 37x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 5,0 14,0 20,0 26,0 30,0 lines=0@14++== selection+n0 generic bounds=8,8 784x136+ n1 textbox value="typed value" bounds=8,13 169x20 editable+ n2 checkbox bounds=189,11 13x13 checked=mixed+ n3 combobox bounds=213,13 83x20+ n4 option name="first" bounds=213,13 83x20+ n5 option name="second" bounds=213,13 83x20 selected+ n6 group bounds=10,33 780x39 disabled+ n7 button name="in fieldset" bounds=24,40 83x20 disabled+ n8 text leaf name="in fieldset" bounds=33,43 65x14 font="SerenitySans" 13.328125 400 normal color=#808080 background=#efefef characters=0,0 3,0 11,0 18,0 23,0 27,0 34,0 38,0 44,0 52,0 60,0 lines=0@14+ n9 paragraph bounds=8,88 784x20+ n10 text leaf name="selectable paragraph" bounds=8,90 167x16 caret=6 selection=2..6 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 22,0 31,0 39,0 46,0 56,0 65,0 69,0 78,0 86,0 95,0 105,0 114,0 123,0 131,0 139,0 149,0 158,0 lines=0@16+ n11 button name="toggle" bounds=8,124 55x20 focused expanded=false pressed=false+ n12 text leaf name="toggle" bounds=17,127 37x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 5,0 14,0 20,0 26,0 30,0 lines=0@14++== selection collapsed+n0 generic bounds=8,8 784x136+ n1 textbox value="typed value" bounds=8,13 169x20 editable+ n2 checkbox bounds=189,11 13x13 checked=mixed+ n3 combobox bounds=213,13 83x20+ n4 option name="first" bounds=213,13 83x20+ n5 option name="second" bounds=213,13 83x20 selected+ n6 group bounds=10,33 780x39 disabled+ n7 button name="in fieldset" bounds=24,40 83x20 disabled+ n8 text leaf name="in fieldset" bounds=33,43 65x14 font="SerenitySans" 13.328125 400 normal color=#808080 background=#efefef characters=0,0 3,0 11,0 18,0 23,0 27,0 34,0 38,0 44,0 52,0 60,0 lines=0@14+ n9 paragraph bounds=8,88 784x20+ n10 text leaf name="selectable paragraph" bounds=8,90 167x16 caret=6 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 22,0 31,0 39,0 46,0 56,0 65,0 69,0 78,0 86,0 95,0 105,0 114,0 123,0 131,0 139,0 149,0 158,0 lines=0@16+ n11 button name="toggle" bounds=8,124 55x20 focused expanded=false pressed=false+ n12 text leaf name="toggle" bounds=17,127 37x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 5,0 14,0 20,0 26,0 30,0 lines=0@14++== aria-expanded and aria-pressed+n0 generic bounds=8,8 784x136+ n1 textbox value="typed value" bounds=8,13 169x20 editable+ n2 checkbox bounds=189,11 13x13 checked=mixed+ n3 combobox bounds=213,13 83x20+ n4 option name="first" bounds=213,13 83x20+ n5 option name="second" bounds=213,13 83x20 selected+ n6 group bounds=10,33 780x39 disabled+ n7 button name="in fieldset" bounds=24,40 83x20 disabled+ n8 text leaf name="in fieldset" bounds=33,43 65x14 font="SerenitySans" 13.328125 400 normal color=#808080 background=#efefef characters=0,0 3,0 11,0 18,0 23,0 27,0 34,0 38,0 44,0 52,0 60,0 lines=0@14+ n9 paragraph bounds=8,88 784x20+ n10 text leaf name="selectable paragraph" bounds=8,90 167x16 caret=6 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 22,0 31,0 39,0 46,0 56,0 65,0 69,0 78,0 86,0 95,0 105,0 114,0 123,0 131,0 139,0 149,0 158,0 lines=0@16+ n11 button name="toggle" bounds=8,124 55x20 focused expanded=true pressed=true+ n12 text leaf name="toggle" bounds=17,127 37x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 5,0 14,0 20,0 26,0 30,0 lines=0@14+diff --git a/Tests/LibWeb/Text/expected/accessibility-node-data-structure.txt b/Tests/LibWeb/Text/expected/accessibility-node-data-structure.txtnew file mode 100644index 00000000000..0ccf1fcd3c8--- /dev/null+++ b/Tests/LibWeb/Text/expected/accessibility-node-data-structure.txt@@ -0,0 +1,242 @@+== initial+n0 generic bounds=8,16 784x152+ n1 list bounds=8,16 784x40+ n2 listitem bounds=48,16 744x20+ n3 text leaf name="one" bounds=48,18 28x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 10,0 19,0 lines=0@16+ n4 listitem bounds=48,36 744x20+ n5 text leaf name="two" bounds=48,38 28x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 18,0 lines=0@16+ n6 generic bounds=8,72 784x20+ n7 paragraph bounds=8,72 784x20+ n8 text leaf name="moving paragraph" bounds=8,74 141x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 12,0 22,0 30,0 35,0 44,0 52,0 60,0 69,0 79,0 88,0 97,0 105,0 113,0 123,0 132,0 lines=0@16+ n9 generic bounds=8,108 784x0+ n10 generic bounds=8,108 784x20+ n11 text leaf name="toggled text" bounds=8,110 93x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 17,0 24,0 32,0 36,0 45,0 53,0 61,0 68,0 76,0 86,0 lines=0@16+ n12 generic bounds=8,128 784x20+ n13 button name="wrapped button" bounds=8,128 122x20+ n14 text leaf name="wrapped button" bounds=17,131 104x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 9,0 16,0 24,0 32,0 40,0 47,0 53,0 60,0 68,0 76,0 82,0 88,0 96,0 lines=0@14+ n15 generic bounds=8,148 784x20+ n16 text leaf name="role changing" bounds=8,150 106x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 19,0 23,0 32,0 40,0 49,0 58,0 67,0 77,0 84,0 89,0 99,0 lines=0@16++== insert a list item+n0 generic bounds=8,16 784x172+ n1 list bounds=8,16 784x60+ n2 listitem bounds=48,16 744x20+ n3 text leaf name="one" bounds=48,18 28x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 10,0 19,0 lines=0@16+ n4 listitem bounds=48,36 744x20+ n5 text leaf name="two" bounds=48,38 28x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 18,0 lines=0@16+ n6 listitem bounds=48,56 744x20+ n7 text leaf name="three" bounds=48,58 42x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 24,0 33,0 lines=0@16+ n8 generic bounds=8,92 784x20+ n9 paragraph bounds=8,92 784x20+ n10 text leaf name="moving paragraph" bounds=8,94 141x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 12,0 22,0 30,0 35,0 44,0 52,0 60,0 69,0 79,0 88,0 97,0 105,0 113,0 123,0 132,0 lines=0@16+ n11 generic bounds=8,128 784x0+ n12 generic bounds=8,128 784x20+ n13 text leaf name="toggled text" bounds=8,130 93x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 17,0 24,0 32,0 36,0 45,0 53,0 61,0 68,0 76,0 86,0 lines=0@16+ n14 generic bounds=8,148 784x20+ n15 button name="wrapped button" bounds=8,148 122x20+ n16 text leaf name="wrapped button" bounds=17,151 104x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 9,0 16,0 24,0 32,0 40,0 47,0 53,0 60,0 68,0 76,0 82,0 88,0 96,0 lines=0@14+ n17 generic bounds=8,168 784x20+ n18 text leaf name="role changing" bounds=8,170 106x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 19,0 23,0 32,0 40,0 49,0 58,0 67,0 77,0 84,0 89,0 99,0 lines=0@16++== remove a list item+n0 generic bounds=8,16 784x152+ n1 list bounds=8,16 784x40+ n2 listitem bounds=48,16 744x20+ n3 text leaf name="two" bounds=48,18 28x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 18,0 lines=0@16+ n4 listitem bounds=48,36 744x20+ n5 text leaf name="three" bounds=48,38 42x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 24,0 33,0 lines=0@16+ n6 generic bounds=8,72 784x20+ n7 paragraph bounds=8,72 784x20+ n8 text leaf name="moving paragraph" bounds=8,74 141x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 12,0 22,0 30,0 35,0 44,0 52,0 60,0 69,0 79,0 88,0 97,0 105,0 113,0 123,0 132,0 lines=0@16+ n9 generic bounds=8,108 784x0+ n10 generic bounds=8,108 784x20+ n11 text leaf name="toggled text" bounds=8,110 93x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 17,0 24,0 32,0 36,0 45,0 53,0 61,0 68,0 76,0 86,0 lines=0@16+ n12 generic bounds=8,128 784x20+ n13 button name="wrapped button" bounds=8,128 122x20+ n14 text leaf name="wrapped button" bounds=17,131 104x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 9,0 16,0 24,0 32,0 40,0 47,0 53,0 60,0 68,0 76,0 82,0 88,0 96,0 lines=0@14+ n15 generic bounds=8,148 784x20+ n16 text leaf name="role changing" bounds=8,150 106x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 19,0 23,0 32,0 40,0 49,0 58,0 67,0 77,0 84,0 89,0 99,0 lines=0@16++== move a paragraph+n0 generic bounds=8,16 784x152+ n1 list bounds=8,16 784x40+ n2 listitem bounds=48,16 744x20+ n3 text leaf name="two" bounds=48,18 28x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 18,0 lines=0@16+ n4 listitem bounds=48,36 744x20+ n5 text leaf name="three" bounds=48,38 42x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 24,0 33,0 lines=0@16+ n6 generic bounds=8,72 784x0+ n7 generic bounds=8,72 784x20+ n8 paragraph bounds=8,72 784x20+ n9 text leaf name="moving paragraph" bounds=8,74 141x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 12,0 22,0 30,0 35,0 44,0 52,0 60,0 69,0 79,0 88,0 97,0 105,0 113,0 123,0 132,0 lines=0@16+ n10 generic bounds=8,108 784x20+ n11 text leaf name="toggled text" bounds=8,110 93x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 17,0 24,0 32,0 36,0 45,0 53,0 61,0 68,0 76,0 86,0 lines=0@16+ n12 generic bounds=8,128 784x20+ n13 button name="wrapped button" bounds=8,128 122x20+ n14 text leaf name="wrapped button" bounds=17,131 104x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 9,0 16,0 24,0 32,0 40,0 47,0 53,0 60,0 68,0 76,0 82,0 88,0 96,0 lines=0@14+ n15 generic bounds=8,148 784x20+ n16 text leaf name="role changing" bounds=8,150 106x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 19,0 23,0 32,0 40,0 49,0 58,0 67,0 77,0 84,0 89,0 99,0 lines=0@16++== display: none+n0 generic bounds=8,16 784x132+ n1 list bounds=8,16 784x40+ n2 listitem bounds=48,16 744x20+ n3 text leaf name="two" bounds=48,18 28x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 18,0 lines=0@16+ n4 listitem bounds=48,36 744x20+ n5 text leaf name="three" bounds=48,38 42x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 24,0 33,0 lines=0@16+ n6 generic bounds=8,72 784x0+ n7 generic bounds=8,72 784x20+ n8 paragraph bounds=8,72 784x20+ n9 text leaf name="moving paragraph" bounds=8,74 141x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 12,0 22,0 30,0 35,0 44,0 52,0 60,0 69,0 79,0 88,0 97,0 105,0 113,0 123,0 132,0 lines=0@16+ n10 generic bounds=8,108 784x20+ n11 button name="wrapped button" bounds=8,108 122x20+ n12 text leaf name="wrapped button" bounds=17,111 104x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 9,0 16,0 24,0 32,0 40,0 47,0 53,0 60,0 68,0 76,0 82,0 88,0 96,0 lines=0@14+ n13 generic bounds=8,128 784x20+ n14 text leaf name="role changing" bounds=8,130 106x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 19,0 23,0 32,0 40,0 49,0 58,0 67,0 77,0 84,0 89,0 99,0 lines=0@16++== display back+n0 generic bounds=8,16 784x152+ n1 list bounds=8,16 784x40+ n2 listitem bounds=48,16 744x20+ n3 text leaf name="two" bounds=48,18 28x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 18,0 lines=0@16+ n4 listitem bounds=48,36 744x20+ n5 text leaf name="three" bounds=48,38 42x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 24,0 33,0 lines=0@16+ n6 generic bounds=8,72 784x0+ n7 generic bounds=8,72 784x20+ n8 paragraph bounds=8,72 784x20+ n9 text leaf name="moving paragraph" bounds=8,74 141x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 12,0 22,0 30,0 35,0 44,0 52,0 60,0 69,0 79,0 88,0 97,0 105,0 113,0 123,0 132,0 lines=0@16+ n10 generic bounds=8,108 784x20+ n11 text leaf name="toggled text" bounds=8,110 93x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 17,0 24,0 32,0 36,0 45,0 53,0 61,0 68,0 76,0 86,0 lines=0@16+ n12 generic bounds=8,128 784x20+ n13 button name="wrapped button" bounds=8,128 122x20+ n14 text leaf name="wrapped button" bounds=17,131 104x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 9,0 16,0 24,0 32,0 40,0 47,0 53,0 60,0 68,0 76,0 82,0 88,0 96,0 lines=0@14+ n15 generic bounds=8,148 784x20+ n16 text leaf name="role changing" bounds=8,150 106x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 19,0 23,0 32,0 40,0 49,0 58,0 67,0 77,0 84,0 89,0 99,0 lines=0@16++== visibility: hidden+n0 generic bounds=8,16 784x152+ n1 list bounds=8,16 784x40+ n2 listitem bounds=48,16 744x20+ n3 text leaf name="two" bounds=48,18 28x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 18,0 lines=0@16+ n4 listitem bounds=48,36 744x20+ n5 text leaf name="three" bounds=48,38 42x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 24,0 33,0 lines=0@16+ n6 generic bounds=8,72 784x0+ n7 generic bounds=8,72 784x20+ n8 paragraph bounds=8,72 784x20+ n9 text leaf name="moving paragraph" bounds=8,74 141x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 12,0 22,0 30,0 35,0 44,0 52,0 60,0 69,0 79,0 88,0 97,0 105,0 113,0 123,0 132,0 lines=0@16+ n10 generic bounds=8,128 784x20+ n11 button name="wrapped button" bounds=8,128 122x20+ n12 text leaf name="wrapped button" bounds=17,131 104x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 9,0 16,0 24,0 32,0 40,0 47,0 53,0 60,0 68,0 76,0 82,0 88,0 96,0 lines=0@14+ n13 generic bounds=8,148 784x20+ n14 text leaf name="role changing" bounds=8,150 106x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 19,0 23,0 32,0 40,0 49,0 58,0 67,0 77,0 84,0 89,0 99,0 lines=0@16++== visibility back+n0 generic bounds=8,16 784x152+ n1 list bounds=8,16 784x40+ n2 listitem bounds=48,16 744x20+ n3 text leaf name="two" bounds=48,18 28x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 18,0 lines=0@16+ n4 listitem bounds=48,36 744x20+ n5 text leaf name="three" bounds=48,38 42x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 24,0 33,0 lines=0@16+ n6 generic bounds=8,72 784x0+ n7 generic bounds=8,72 784x20+ n8 paragraph bounds=8,72 784x20+ n9 text leaf name="moving paragraph" bounds=8,74 141x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 12,0 22,0 30,0 35,0 44,0 52,0 60,0 69,0 79,0 88,0 97,0 105,0 113,0 123,0 132,0 lines=0@16+ n10 generic bounds=8,108 784x20+ n11 text leaf name="toggled text" bounds=8,110 93x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 17,0 24,0 32,0 36,0 45,0 53,0 61,0 68,0 76,0 86,0 lines=0@16+ n12 generic bounds=8,128 784x20+ n13 button name="wrapped button" bounds=8,128 122x20+ n14 text leaf name="wrapped button" bounds=17,131 104x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 9,0 16,0 24,0 32,0 40,0 47,0 53,0 60,0 68,0 76,0 82,0 88,0 96,0 lines=0@14+ n15 generic bounds=8,148 784x20+ n16 text leaf name="role changing" bounds=8,150 106x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 19,0 23,0 32,0 40,0 49,0 58,0 67,0 77,0 84,0 89,0 99,0 lines=0@16++== aria-hidden+n0 generic bounds=8,16 784x152+ n1 list bounds=8,16 784x40+ n2 listitem bounds=48,16 744x20+ n3 text leaf name="two" bounds=48,18 28x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 18,0 lines=0@16+ n4 listitem bounds=48,36 744x20+ n5 text leaf name="three" bounds=48,38 42x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 24,0 33,0 lines=0@16+ n6 generic bounds=8,72 784x0+ n7 generic bounds=8,72 784x20+ n8 paragraph bounds=8,72 784x20+ n9 text leaf name="moving paragraph" bounds=8,74 141x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 12,0 22,0 30,0 35,0 44,0 52,0 60,0 69,0 79,0 88,0 97,0 105,0 113,0 123,0 132,0 lines=0@16+ n10 generic bounds=8,128 784x20+ n11 button name="wrapped button" bounds=8,128 122x20+ n12 text leaf name="wrapped button" bounds=17,131 104x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 9,0 16,0 24,0 32,0 40,0 47,0 53,0 60,0 68,0 76,0 82,0 88,0 96,0 lines=0@14+ n13 generic bounds=8,148 784x20+ n14 text leaf name="role changing" bounds=8,150 106x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 19,0 23,0 32,0 40,0 49,0 58,0 67,0 77,0 84,0 89,0 99,0 lines=0@16++== aria-hidden removed+n0 generic bounds=8,16 784x152+ n1 list bounds=8,16 784x40+ n2 listitem bounds=48,16 744x20+ n3 text leaf name="two" bounds=48,18 28x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 18,0 lines=0@16+ n4 listitem bounds=48,36 744x20+ n5 text leaf name="three" bounds=48,38 42x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 24,0 33,0 lines=0@16+ n6 generic bounds=8,72 784x0+ n7 generic bounds=8,72 784x20+ n8 paragraph bounds=8,72 784x20+ n9 text leaf name="moving paragraph" bounds=8,74 141x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 12,0 22,0 30,0 35,0 44,0 52,0 60,0 69,0 79,0 88,0 97,0 105,0 113,0 123,0 132,0 lines=0@16+ n10 generic bounds=8,108 784x20+ n11 text leaf name="toggled text" bounds=8,110 93x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 17,0 24,0 32,0 36,0 45,0 53,0 61,0 68,0 76,0 86,0 lines=0@16+ n12 generic bounds=8,128 784x20+ n13 button name="wrapped button" bounds=8,128 122x20+ n14 text leaf name="wrapped button" bounds=17,131 104x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 9,0 16,0 24,0 32,0 40,0 47,0 53,0 60,0 68,0 76,0 82,0 88,0 96,0 lines=0@14+ n15 generic bounds=8,148 784x20+ n16 text leaf name="role changing" bounds=8,150 106x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 19,0 23,0 32,0 40,0 49,0 58,0 67,0 77,0 84,0 89,0 99,0 lines=0@16++== role added+n0 generic bounds=8,16 784x152+ n1 list bounds=8,16 784x40+ n2 listitem bounds=48,16 744x20+ n3 text leaf name="two" bounds=48,18 28x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 18,0 lines=0@16+ n4 listitem bounds=48,36 744x20+ n5 text leaf name="three" bounds=48,38 42x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 24,0 33,0 lines=0@16+ n6 generic bounds=8,72 784x0+ n7 generic bounds=8,72 784x20+ n8 paragraph bounds=8,72 784x20+ n9 text leaf name="moving paragraph" bounds=8,74 141x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 12,0 22,0 30,0 35,0 44,0 52,0 60,0 69,0 79,0 88,0 97,0 105,0 113,0 123,0 132,0 lines=0@16+ n10 generic bounds=8,108 784x20+ n11 text leaf name="toggled text" bounds=8,110 93x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 17,0 24,0 32,0 36,0 45,0 53,0 61,0 68,0 76,0 86,0 lines=0@16+ n12 generic bounds=8,128 784x20+ n13 button name="wrapped button" bounds=8,128 122x20+ n14 text leaf name="wrapped button" bounds=17,131 104x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 9,0 16,0 24,0 32,0 40,0 47,0 53,0 60,0 68,0 76,0 82,0 88,0 96,0 lines=0@14+ n15 button name="role changing" bounds=8,148 784x20+ n16 text leaf name="role changing" bounds=8,150 106x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 19,0 23,0 32,0 40,0 49,0 58,0 67,0 77,0 84,0 89,0 99,0 lines=0@16++== wrapper becomes a region+n0 generic bounds=8,16 784x152+ n1 list bounds=8,16 784x40+ n2 listitem bounds=48,16 744x20+ n3 text leaf name="two" bounds=48,18 28x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 18,0 lines=0@16+ n4 listitem bounds=48,36 744x20+ n5 text leaf name="three" bounds=48,38 42x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 24,0 33,0 lines=0@16+ n6 generic bounds=8,72 784x0+ n7 generic bounds=8,72 784x20+ n8 paragraph bounds=8,72 784x20+ n9 text leaf name="moving paragraph" bounds=8,74 141x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 12,0 22,0 30,0 35,0 44,0 52,0 60,0 69,0 79,0 88,0 97,0 105,0 113,0 123,0 132,0 lines=0@16+ n10 generic bounds=8,108 784x20+ n11 text leaf name="toggled text" bounds=8,110 93x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 17,0 24,0 32,0 36,0 45,0 53,0 61,0 68,0 76,0 86,0 lines=0@16+ n12 region name="the region" bounds=8,128 784x20+ n13 button name="wrapped button" bounds=8,128 122x20+ n14 text leaf name="wrapped button" bounds=17,131 104x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 9,0 16,0 24,0 32,0 40,0 47,0 53,0 60,0 68,0 76,0 82,0 88,0 96,0 lines=0@14+ n15 button name="role changing" bounds=8,148 784x20+ n16 text leaf name="role changing" bounds=8,150 106x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 19,0 23,0 32,0 40,0 49,0 58,0 67,0 77,0 84,0 89,0 99,0 lines=0@16++== wrapper unwrapped+n0 generic bounds=8,16 784x152+ n1 list bounds=8,16 784x40+ n2 listitem bounds=48,16 744x20+ n3 text leaf name="two" bounds=48,18 28x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 18,0 lines=0@16+ n4 listitem bounds=48,36 744x20+ n5 text leaf name="three" bounds=48,38 42x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 24,0 33,0 lines=0@16+ n6 generic bounds=8,72 784x0+ n7 generic bounds=8,72 784x20+ n8 paragraph bounds=8,72 784x20+ n9 text leaf name="moving paragraph" bounds=8,74 141x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 12,0 22,0 30,0 35,0 44,0 52,0 60,0 69,0 79,0 88,0 97,0 105,0 113,0 123,0 132,0 lines=0@16+ n10 generic bounds=8,108 784x20+ n11 text leaf name="toggled text" bounds=8,110 93x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 17,0 24,0 32,0 36,0 45,0 53,0 61,0 68,0 76,0 86,0 lines=0@16+ n12 button name="wrapped button" bounds=8,128 122x20+ n13 text leaf name="wrapped button" bounds=17,131 104x14 font="SerenitySans" 13.328125 400 normal color=#000000 background=#efefef characters=0,0 9,0 16,0 24,0 32,0 40,0 47,0 53,0 60,0 68,0 76,0 82,0 88,0 96,0 lines=0@14+ n14 button name="role changing" bounds=8,148 784x20+ n15 text leaf name="role changing" bounds=8,150 106x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 8,0 19,0 23,0 32,0 40,0 49,0 58,0 67,0 77,0 84,0 89,0 99,0 lines=0@16+diff --git a/Tests/LibWeb/Text/expected/accessibility-node-data-tables-and-geometry.txt b/Tests/LibWeb/Text/expected/accessibility-node-data-tables-and-geometry.txtnew file mode 100644index 00000000000..986be9234fa--- /dev/null+++ b/Tests/LibWeb/Text/expected/accessibility-node-data-tables-and-geometry.txt@@ -0,0 +1,212 @@+== initial+n0 generic bounds=8,8 784x162+ n1 table bounds=8,8 167x50 table=2x2 column_headers=[n4 n6] row_headers=[n4 none]+ n2 rowgroup bounds=10,10 163x46+ n3 row name="header other header" bounds=10,10 163x22+ n4 rowheader name="header" bounds=10,10 54x22 column_index=0+ n5 text leaf name="header" bounds=11,13 52x16 font="SerenitySans" 16 700 normal color=#000000 characters=0,0 9,0 18,0 27,0 35,0 43,0 lines=0@16+ n6 rowheader name="other header" bounds=66,10 106x22 column_index=1+ n7 text leaf name="other header" bounds=67,13 104x16 font="SerenitySans" 16 700 normal color=#000000 characters=0,0 10,0 17,0 26,0 35,0 44,0 52,0 61,0 70,0 79,0 87,0 96,0 lines=0@16+ n8 row name="a b" bounds=10,34 163x22+ n9 cell name="a" bounds=10,34 54x22 column_index=0+ n10 text leaf name="a" bounds=11,37 9x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n11 cell name="b" bounds=66,34 106x22 column_index=1+ n12 text leaf name="b" bounds=67,37 9x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n13 paragraph bounds=8,74 300x40+ n14 text leaf name="text that wraps once the paragraph gets narrower" bounds=8,76 304x36 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 15,0 25,0 32,0 40,0 47,0 56,0 65,0 72,0 80,0 91,0 100,0 109,0 119,0 128,0 136,0 147,0 156,0 165,0 174,0 182,0 189,0 198,0 207,0 215,0 224,0 233,0 242,0 252,0 259,0 268,0 277,0 287,0 296,0 0,20 7,20 16,20 23,20 32,20 40,20 50,20 59,20 68,20 77,20 87,20 98,20 107,20 lines=0@16 35@16+ n15 generic bounds=8,130 784x40+ n16 paragraph bounds=8,146 784x20+ n17 text leaf name="first" bounds=8,148 36x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 29,0 lines=0@16+ n18 paragraph bounds=8,182 784x20+ n19 text leaf name="second" bounds=8,184 54x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 26,0 37,0 46,0 lines=0@16+ n20 paragraph bounds=8,218 784x20+ n21 text leaf name="third" bounds=8,220 37x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 20,0 29,0 lines=0@16+ n22 paragraph bounds=8,254 784x20+ n23 text leaf name="fourth" bounds=8,256 51x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 26,0 35,0 42,0 lines=0@16++== row added+n0 generic bounds=8,8 784x186+ n1 table bounds=8,8 167x74 table=3x2 column_headers=[n4 n6] row_headers=[n4 none none]+ n2 rowgroup bounds=10,10 163x70+ n3 row name="header other header" bounds=10,10 163x22+ n4 rowheader name="header" bounds=10,10 54x22 column_index=0+ n5 text leaf name="header" bounds=11,13 52x16 font="SerenitySans" 16 700 normal color=#000000 characters=0,0 9,0 18,0 27,0 35,0 43,0 lines=0@16+ n6 rowheader name="other header" bounds=66,10 106x22 column_index=1+ n7 text leaf name="other header" bounds=67,13 104x16 font="SerenitySans" 16 700 normal color=#000000 characters=0,0 10,0 17,0 26,0 35,0 44,0 52,0 61,0 70,0 79,0 87,0 96,0 lines=0@16+ n8 row name="a b" bounds=10,34 163x22+ n9 cell name="a" bounds=10,34 54x22 column_index=0+ n10 text leaf name="a" bounds=11,37 9x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n11 cell name="b" bounds=66,34 106x22 column_index=1+ n12 text leaf name="b" bounds=67,37 9x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n13 row name="c d" bounds=10,58 163x22+ n14 cell name="c" bounds=10,58 54x22 column_index=0+ n15 text leaf name="c" bounds=11,61 8x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n16 cell name="d" bounds=66,58 106x22 column_index=1+ n17 text leaf name="d" bounds=67,61 7x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n18 paragraph bounds=8,98 300x40+ n19 text leaf name="text that wraps once the paragraph gets narrower" bounds=8,100 304x36 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 15,0 25,0 32,0 40,0 47,0 56,0 65,0 72,0 80,0 91,0 100,0 109,0 119,0 128,0 136,0 147,0 156,0 165,0 174,0 182,0 189,0 198,0 207,0 215,0 224,0 233,0 242,0 252,0 259,0 268,0 277,0 287,0 296,0 0,20 7,20 16,20 23,20 32,20 40,20 50,20 59,20 68,20 77,20 87,20 98,20 107,20 lines=0@16 35@16+ n20 generic bounds=8,154 784x40+ n21 paragraph bounds=8,170 784x20+ n22 text leaf name="first" bounds=8,172 36x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 29,0 lines=0@16+ n23 paragraph bounds=8,206 784x20+ n24 text leaf name="second" bounds=8,208 54x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 26,0 37,0 46,0 lines=0@16+ n25 paragraph bounds=8,242 784x20+ n26 text leaf name="third" bounds=8,244 37x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 20,0 29,0 lines=0@16+ n27 paragraph bounds=8,278 784x20+ n28 text leaf name="fourth" bounds=8,280 51x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 26,0 35,0 42,0 lines=0@16++== colspan+n0 generic bounds=8,8 784x186+ n1 table bounds=8,8 181x74 table=3x3 column_headers=[n4 n6 none] row_headers=[n4 none none]+ n2 rowgroup bounds=10,10 177x70+ n3 row name="header other header" bounds=10,10 177x22+ n4 rowheader name="header" bounds=10,10 54x22 column_index=0+ n5 text leaf name="header" bounds=11,13 52x16 font="SerenitySans" 16 700 normal color=#000000 characters=0,0 9,0 18,0 27,0 35,0 43,0 lines=0@16+ n6 rowheader name="other header" bounds=66,10 106x22 column_index=1+ n7 text leaf name="other header" bounds=67,13 104x16 font="SerenitySans" 16 700 normal color=#000000 characters=0,0 10,0 17,0 26,0 35,0 44,0 52,0 61,0 70,0 79,0 87,0 96,0 lines=0@16+ n8 row name="a b" bounds=10,34 177x22+ n9 cell name="a" bounds=10,34 163x22 span=2x1 column_index=0+ n10 text leaf name="a" bounds=11,37 9x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n11 cell name="b" bounds=175,34 11x22 column_index=2+ n12 text leaf name="b" bounds=176,37 9x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n13 row name="c d" bounds=10,58 177x22+ n14 cell name="c" bounds=10,58 54x22 column_index=0+ n15 text leaf name="c" bounds=11,61 8x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n16 cell name="d" bounds=66,58 106x22 column_index=1+ n17 text leaf name="d" bounds=67,61 7x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n18 paragraph bounds=8,98 300x40+ n19 text leaf name="text that wraps once the paragraph gets narrower" bounds=8,100 304x36 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 15,0 25,0 32,0 40,0 47,0 56,0 65,0 72,0 80,0 91,0 100,0 109,0 119,0 128,0 136,0 147,0 156,0 165,0 174,0 182,0 189,0 198,0 207,0 215,0 224,0 233,0 242,0 252,0 259,0 268,0 277,0 287,0 296,0 0,20 7,20 16,20 23,20 32,20 40,20 50,20 59,20 68,20 77,20 87,20 98,20 107,20 lines=0@16 35@16+ n20 generic bounds=8,154 784x40+ n21 paragraph bounds=8,170 784x20+ n22 text leaf name="first" bounds=8,172 36x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 29,0 lines=0@16+ n23 paragraph bounds=8,206 784x20+ n24 text leaf name="second" bounds=8,208 54x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 26,0 37,0 46,0 lines=0@16+ n25 paragraph bounds=8,242 784x20+ n26 text leaf name="third" bounds=8,244 37x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 20,0 29,0 lines=0@16+ n27 paragraph bounds=8,278 784x20+ n28 text leaf name="fourth" bounds=8,280 51x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 26,0 35,0 42,0 lines=0@16++== header text+n0 generic bounds=8,8 784x186+ n1 table bounds=8,8 218x74 table=3x3 column_headers=[n4 n6 none] row_headers=[n4 none none]+ n2 rowgroup bounds=10,10 214x70+ n3 row name="new header other header" bounds=10,10 214x22+ n4 rowheader name="new header" bounds=10,10 92x22 column_index=0+ n5 text leaf name="new header" bounds=11,13 90x16 font="SerenitySans" 16 700 normal color=#000000 characters=0,0 9,0 18,0 29,0 37,0 46,0 55,0 64,0 72,0 81,0 lines=0@16+ n6 rowheader name="other header" bounds=104,10 106x22 column_index=1+ n7 text leaf name="other header" bounds=105,13 104x16 font="SerenitySans" 16 700 normal color=#000000 characters=0,0 10,0 17,0 26,0 35,0 44,0 52,0 61,0 70,0 79,0 87,0 96,0 lines=0@16+ n8 row name="a b" bounds=10,34 214x22+ n9 cell name="a" bounds=10,34 201x22 span=2x1 column_index=0+ n10 text leaf name="a" bounds=11,37 9x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n11 cell name="b" bounds=213,34 11x22 column_index=2+ n12 text leaf name="b" bounds=214,37 9x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n13 row name="c d" bounds=10,58 214x22+ n14 cell name="c" bounds=10,58 92x22 column_index=0+ n15 text leaf name="c" bounds=11,61 8x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n16 cell name="d" bounds=104,58 106x22 column_index=1+ n17 text leaf name="d" bounds=105,61 7x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n18 paragraph bounds=8,98 300x40+ n19 text leaf name="text that wraps once the paragraph gets narrower" bounds=8,100 304x36 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 15,0 25,0 32,0 40,0 47,0 56,0 65,0 72,0 80,0 91,0 100,0 109,0 119,0 128,0 136,0 147,0 156,0 165,0 174,0 182,0 189,0 198,0 207,0 215,0 224,0 233,0 242,0 252,0 259,0 268,0 277,0 287,0 296,0 0,20 7,20 16,20 23,20 32,20 40,20 50,20 59,20 68,20 77,20 87,20 98,20 107,20 lines=0@16 35@16+ n20 generic bounds=8,154 784x40+ n21 paragraph bounds=8,170 784x20+ n22 text leaf name="first" bounds=8,172 36x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 29,0 lines=0@16+ n23 paragraph bounds=8,206 784x20+ n24 text leaf name="second" bounds=8,208 54x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 26,0 37,0 46,0 lines=0@16+ n25 paragraph bounds=8,242 784x20+ n26 text leaf name="third" bounds=8,244 37x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 20,0 29,0 lines=0@16+ n27 paragraph bounds=8,278 784x20+ n28 text leaf name="fourth" bounds=8,280 51x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 26,0 35,0 42,0 lines=0@16++== narrower, so the text wraps+n0 generic bounds=8,8 784x226+ n1 table bounds=8,8 218x74 table=3x3 column_headers=[n4 n6 none] row_headers=[n4 none none]+ n2 rowgroup bounds=10,10 214x70+ n3 row name="new header other header" bounds=10,10 214x22+ n4 rowheader name="new header" bounds=10,10 92x22 column_index=0+ n5 text leaf name="new header" bounds=11,13 90x16 font="SerenitySans" 16 700 normal color=#000000 characters=0,0 9,0 18,0 29,0 37,0 46,0 55,0 64,0 72,0 81,0 lines=0@16+ n6 rowheader name="other header" bounds=104,10 106x22 column_index=1+ n7 text leaf name="other header" bounds=105,13 104x16 font="SerenitySans" 16 700 normal color=#000000 characters=0,0 10,0 17,0 26,0 35,0 44,0 52,0 61,0 70,0 79,0 87,0 96,0 lines=0@16+ n8 row name="a b" bounds=10,34 214x22+ n9 cell name="a" bounds=10,34 201x22 span=2x1 column_index=0+ n10 text leaf name="a" bounds=11,37 9x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n11 cell name="b" bounds=213,34 11x22 column_index=2+ n12 text leaf name="b" bounds=214,37 9x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n13 row name="c d" bounds=10,58 214x22+ n14 cell name="c" bounds=10,58 92x22 column_index=0+ n15 text leaf name="c" bounds=11,61 8x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n16 cell name="d" bounds=104,58 106x22 column_index=1+ n17 text leaf name="d" bounds=105,61 7x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n18 paragraph bounds=8,98 120x80+ n19 text leaf name="text that wraps once the paragraph gets narrower" bounds=8,100 122x76 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 15,0 25,0 32,0 40,0 47,0 56,0 65,0 72,0 0,20 11,20 20,20 29,20 38,20 48,20 56,20 66,20 76,20 85,20 93,20 0,40 6,40 16,40 24,40 32,40 42,40 51,40 60,40 69,40 77,40 86,40 95,40 104,40 114,40 0,60 7,60 16,60 23,60 32,60 40,60 50,60 59,60 68,60 77,60 87,60 98,60 107,60 lines=0@16 10@16 21@16 35@16+ n20 generic bounds=8,194 784x40+ n21 paragraph bounds=8,210 784x20+ n22 text leaf name="first" bounds=8,212 36x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 29,0 lines=0@16+ n23 paragraph bounds=8,246 784x20+ n24 text leaf name="second" bounds=8,248 54x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 26,0 37,0 46,0 lines=0@16+ n25 paragraph bounds=8,282 784x20+ n26 text leaf name="third" bounds=8,284 37x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 20,0 29,0 lines=0@16+ n27 paragraph bounds=8,318 784x20+ n28 text leaf name="fourth" bounds=8,320 51x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 26,0 35,0 42,0 lines=0@16++== bigger font+n0 generic bounds=8,8 784x274+ n1 table bounds=8,8 218x74 table=3x3 column_headers=[n4 n6 none] row_headers=[n4 none none]+ n2 rowgroup bounds=10,10 214x70+ n3 row name="new header other header" bounds=10,10 214x22+ n4 rowheader name="new header" bounds=10,10 92x22 column_index=0+ n5 text leaf name="new header" bounds=11,13 90x16 font="SerenitySans" 16 700 normal color=#000000 characters=0,0 9,0 18,0 29,0 37,0 46,0 55,0 64,0 72,0 81,0 lines=0@16+ n6 rowheader name="other header" bounds=104,10 106x22 column_index=1+ n7 text leaf name="other header" bounds=105,13 104x16 font="SerenitySans" 16 700 normal color=#000000 characters=0,0 10,0 17,0 26,0 35,0 44,0 52,0 61,0 70,0 79,0 87,0 96,0 lines=0@16+ n8 row name="a b" bounds=10,34 214x22+ n9 cell name="a" bounds=10,34 201x22 span=2x1 column_index=0+ n10 text leaf name="a" bounds=11,37 9x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n11 cell name="b" bounds=213,34 11x22 column_index=2+ n12 text leaf name="b" bounds=214,37 9x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n13 row name="c d" bounds=10,58 214x22+ n14 cell name="c" bounds=10,58 92x22 column_index=0+ n15 text leaf name="c" bounds=11,61 8x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n16 cell name="d" bounds=104,58 106x22 column_index=1+ n17 text leaf name="d" bounds=105,61 7x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n18 paragraph bounds=8,102 120x120+ n19 text leaf name="text that wraps once the paragraph gets narrower" bounds=8,102 127x120 font="SerenitySans" 20 400 normal color=#000000 characters=0,0 8,0 19,0 31,0 40,0 50,0 58,0 70,0 82,0 90,0 0,20 14,20 25,20 36,20 48,20 60,20 70,20 83,20 95,20 106,20 117,20 0,40 8,40 20,40 31,40 0,60 11,60 23,60 34,60 46,60 55,60 66,60 78,60 90,60 101,60 0,80 9,80 20,80 28,80 40,80 0,100 12,100 23,100 34,100 45,100 58,100 72,100 83,100 lines=0@20 10@20 21@20 25@20 35@20 40@20+ n20 generic bounds=8,242 784x40+ n21 paragraph bounds=8,258 784x20+ n22 text leaf name="first" bounds=8,260 36x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 29,0 lines=0@16+ n23 paragraph bounds=8,294 784x20+ n24 text leaf name="second" bounds=8,296 54x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 26,0 37,0 46,0 lines=0@16+ n25 paragraph bounds=8,330 784x20+ n26 text leaf name="third" bounds=8,332 37x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 20,0 29,0 lines=0@16+ n27 paragraph bounds=8,366 784x20+ n28 text leaf name="fourth" bounds=8,368 51x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 26,0 35,0 42,0 lines=0@16++== scrolled+n0 generic bounds=8,8 784x274+ n1 table bounds=8,8 218x74 table=3x3 column_headers=[n4 n6 none] row_headers=[n4 none none]+ n2 rowgroup bounds=10,10 214x70+ n3 row name="new header other header" bounds=10,10 214x22+ n4 rowheader name="new header" bounds=10,10 92x22 column_index=0+ n5 text leaf name="new header" bounds=11,13 90x16 font="SerenitySans" 16 700 normal color=#000000 characters=0,0 9,0 18,0 29,0 37,0 46,0 55,0 64,0 72,0 81,0 lines=0@16+ n6 rowheader name="other header" bounds=104,10 106x22 column_index=1+ n7 text leaf name="other header" bounds=105,13 104x16 font="SerenitySans" 16 700 normal color=#000000 characters=0,0 10,0 17,0 26,0 35,0 44,0 52,0 61,0 70,0 79,0 87,0 96,0 lines=0@16+ n8 row name="a b" bounds=10,34 214x22+ n9 cell name="a" bounds=10,34 201x22 span=2x1 column_index=0+ n10 text leaf name="a" bounds=11,37 9x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n11 cell name="b" bounds=213,34 11x22 column_index=2+ n12 text leaf name="b" bounds=214,37 9x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n13 row name="c d" bounds=10,58 214x22+ n14 cell name="c" bounds=10,58 92x22 column_index=0+ n15 text leaf name="c" bounds=11,61 8x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n16 cell name="d" bounds=104,58 106x22 column_index=1+ n17 text leaf name="d" bounds=105,61 7x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 lines=0@16+ n18 paragraph bounds=8,102 120x120+ n19 text leaf name="text that wraps once the paragraph gets narrower" bounds=8,102 127x120 font="SerenitySans" 20 400 normal color=#000000 characters=0,0 8,0 19,0 31,0 40,0 50,0 58,0 70,0 82,0 90,0 0,20 14,20 25,20 36,20 48,20 60,20 70,20 83,20 95,20 106,20 117,20 0,40 8,40 20,40 31,40 0,60 11,60 23,60 34,60 46,60 55,60 66,60 78,60 90,60 101,60 0,80 9,80 20,80 28,80 40,80 0,100 12,100 23,100 34,100 45,100 58,100 72,100 83,100 lines=0@20 10@20 21@20 25@20 35@20 40@20+ n20 generic bounds=8,242 784x40+ n21 paragraph bounds=8,228 784x20+ n22 text leaf name="first" bounds=8,230 36x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 11,0 19,0 29,0 lines=0@16+ n23 paragraph bounds=8,264 784x20+ n24 text leaf name="second" bounds=8,266 54x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 9,0 18,0 26,0 37,0 46,0 lines=0@16+ n25 paragraph bounds=8,300 784x20+ n26 text leaf name="third" bounds=8,302 37x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 20,0 29,0 lines=0@16+ n27 paragraph bounds=8,336 784x20+ n28 text leaf name="fourth" bounds=8,338 51x16 font="SerenitySans" 16 400 normal color=#000000 characters=0,0 6,0 16,0 26,0 35,0 42,0 lines=0@16+diff --git a/Tests/LibWeb/Text/input/accessibility-node-data-names.html b/Tests/LibWeb/Text/input/accessibility-node-data-names.htmlnew file mode 100644index 00000000000..5937c49a555--- /dev/null+++ b/Tests/LibWeb/Text/input/accessibility-node-data-names.html@@ -0,0 +1,48 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ body {+ font: 16px/20px SerenitySans;+ }+ .with-before::before {+ content: "Before ";+ }+</style>+<!-- After each change to what a name or description is computed from, the accessibility node data reflects it: text in+ the element itself, in an element it points to with aria-labelledby or aria-describedby (even a hidden one), in a+ label, and in generated content. -->+<div id="root">+ <table>+ <tr><td id="cell">cell text</td></tr>+ </table>+ <span id="hidden-label" hidden>hidden label</span>+ <button id="labelled" aria-labelledby="hidden-label">button text</button>+ <button id="from-content"><span id="inner">inner text</span></button>+ <label for="field" id="field-label">field label</label>+ <input id="field">+ <p id="described" aria-describedby="description">described</p>+ <span id="description">first description</span>+ <button id="pending" aria-labelledby="not-yet">pending</button>+ <button id="generated">generated</button>+</div>+<script>+ test(() => {+ const root = document.getElementById("root");+ const step = (label, change) => {+ change();+ println(`== ${label}`);+ println(internals.dumpAccessibilityNodeData(root));+ };+ step("initial", () => {});+ step("cell textContent", () => document.getElementById("cell").textContent = "new cell text");+ step("cell Text.data", () => document.getElementById("cell").firstChild.data = "edited cell text");+ step("hidden aria-labelledby target", () => document.getElementById("hidden-label").textContent = "new hidden label");+ step("name from content", () => document.getElementById("inner").textContent = "new inner text");+ step("label text", () => document.getElementById("field-label").textContent = "new field label");+ step("aria-label", () => document.getElementById("field").setAttribute("aria-label", "explicit label"));+ step("aria-describedby target", () => document.getElementById("description").textContent = "second description");+ step("id appears for a pending reference", () => document.getElementById("description").id = "not-yet");+ step("referenced id removed", () => document.getElementById("not-yet").remove());+ step("generated content", () => document.getElementById("generated").classList.add("with-before"));+ });+</script>diff --git a/Tests/LibWeb/Text/input/accessibility-node-data-states.html b/Tests/LibWeb/Text/input/accessibility-node-data-states.htmlnew file mode 100644index 00000000000..3212711b14a--- /dev/null+++ b/Tests/LibWeb/Text/input/accessibility-node-data-states.html@@ -0,0 +1,46 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ body {+ font: 16px/20px SerenitySans;+ }+</style>+<!-- After each change to a node's state, the accessibility node data reflects it, including the changes that come from+ a property rather than an attribute: a text field's value, a checkbox's checkedness and indeterminacy, an option's+ selectedness, an ancestor fieldset's disabling, focus, the selection, and ARIA states. -->+<div id="root">+ <input id="text-field" value="initial value">+ <input id="checkbox" type="checkbox">+ <select id="select"><option>first</option><option id="second-option">second</option></select>+ <fieldset id="fieldset"><button id="in-fieldset">in fieldset</button></fieldset>+ <p id="paragraph">selectable paragraph</p>+ <button id="toggle" aria-expanded="false" aria-pressed="false">toggle</button>+</div>+<script>+ test(() => {+ const root = document.getElementById("root");+ const step = (label, change) => {+ change();+ println(`== ${label}`);+ println(internals.dumpAccessibilityNodeData(root));+ };+ step("initial", () => {});+ step("value property", () => document.getElementById("text-field").value = "typed value");+ step("checked property", () => document.getElementById("checkbox").checked = true);+ step("indeterminate property", () => document.getElementById("checkbox").indeterminate = true);+ step("option selected", () => document.getElementById("second-option").selected = true);+ step("fieldset disabled", () => document.getElementById("fieldset").disabled = true);+ step("focus", () => document.getElementById("text-field").focus());+ step("focus moved", () => document.getElementById("toggle").focus());+ step("selection", () => {+ const text = document.getElementById("paragraph").firstChild;+ getSelection().setBaseAndExtent(text, 2, text, 6);+ });+ step("selection collapsed", () => getSelection().collapseToEnd());+ step("aria-expanded and aria-pressed", () => {+ const toggle = document.getElementById("toggle");+ toggle.setAttribute("aria-expanded", "true");+ toggle.setAttribute("aria-pressed", "true");+ });+ });+</script>diff --git a/Tests/LibWeb/Text/input/accessibility-node-data-structure.html b/Tests/LibWeb/Text/input/accessibility-node-data-structure.htmlnew file mode 100644index 00000000000..0ad99f9d18d--- /dev/null+++ b/Tests/LibWeb/Text/input/accessibility-node-data-structure.html@@ -0,0 +1,51 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ body {+ font: 16px/20px SerenitySans;+ }+</style>+<!-- After each change to which nodes the accessibility tree exposes, or where, the accessibility node data reflects it:+ nodes inserted, removed and moved; subtrees hidden and shown with display, visibility and aria-hidden; roles that+ change; and a wrapper the tree flattens away, whose children belong to the wrapper's parent. -->+<div id="root">+ <ul id="list"><li>one</li><li>two</li></ul>+ <section id="first"><p id="moving">moving paragraph</p></section>+ <section id="second"></section>+ <div id="toggled">toggled text</div>+ <div id="wrapper"><button>wrapped button</button></div>+ <div id="role-changing">role changing</div>+</div>+<script>+ test(() => {+ const root = document.getElementById("root");+ const list = document.getElementById("list");+ const toggled = document.getElementById("toggled");+ const step = (label, change) => {+ change();+ println(`== ${label}`);+ println(internals.dumpAccessibilityNodeData(root));+ };+ step("initial", () => {});+ step("insert a list item", () => {+ const item = document.createElement("li");+ item.textContent = "three";+ list.append(item);+ });+ step("remove a list item", () => list.firstElementChild.remove());+ step("move a paragraph", () => document.getElementById("second").append(document.getElementById("moving")));+ step("display: none", () => toggled.style.display = "none");+ step("display back", () => toggled.style.display = "");+ step("visibility: hidden", () => toggled.style.visibility = "hidden");+ step("visibility back", () => toggled.style.visibility = "");+ step("aria-hidden", () => toggled.setAttribute("aria-hidden", "true"));+ step("aria-hidden removed", () => toggled.removeAttribute("aria-hidden"));+ step("role added", () => document.getElementById("role-changing").setAttribute("role", "button"));+ step("wrapper becomes a region", () => {+ const wrapper = document.getElementById("wrapper");+ wrapper.setAttribute("role", "region");+ wrapper.setAttribute("aria-label", "the region");+ });+ step("wrapper unwrapped", () => document.getElementById("wrapper").replaceWith(...document.getElementById("wrapper").childNodes));+ });+</script>diff --git a/Tests/LibWeb/Text/input/accessibility-node-data-tables-and-geometry.html b/Tests/LibWeb/Text/input/accessibility-node-data-tables-and-geometry.htmlnew file mode 100644index 00000000000..b820778e6ce--- /dev/null+++ b/Tests/LibWeb/Text/input/accessibility-node-data-tables-and-geometry.html@@ -0,0 +1,43 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ body {+ font: 16px/20px SerenitySans;+ }+ #scroller {+ height: 40px;+ overflow: auto;+ }+</style>+<!-- After each change to a table's structure, or to layout alone, the accessibility node data reflects it: rows added,+ cells spanning more columns, header text changed; and text that wraps differently, grows, or scrolls — with no+ change to the DOM itself for the last three. -->+<div id="root">+ <table id="table">+ <tr><th id="header">header</th><th>other header</th></tr>+ <tr><td id="spanning">a</td><td>b</td></tr>+ </table>+ <p id="wrapping" style="width: 300px">text that wraps once the paragraph gets narrower</p>+ <div id="scroller"><p>first</p><p>second</p><p>third</p><p>fourth</p></div>+</div>+<script>+ test(() => {+ const root = document.getElementById("root");+ const step = (label, change) => {+ change();+ println(`== ${label}`);+ println(internals.dumpAccessibilityNodeData(root));+ };+ step("initial", () => {});+ step("row added", () => {+ const row = document.getElementById("table").insertRow();+ row.insertCell().textContent = "c";+ row.insertCell().textContent = "d";+ });+ step("colspan", () => document.getElementById("spanning").colSpan = 2);+ step("header text", () => document.getElementById("header").textContent = "new header");+ step("narrower, so the text wraps", () => document.getElementById("wrapping").style.width = "120px");+ step("bigger font", () => document.getElementById("wrapping").style.fontSize = "20px");+ step("scrolled", () => document.getElementById("scroller").scrollTop = 30);+ });+</script>