From e9840bfd4e1b82dcd58dec73c805377701aa2575 Mon Sep 17 00:00:00 2001 From: Jonah Date: Sun, 21 May 2023 08:59:08 -0500 Subject: [PATCH] LibWeb: Build out the ARIA role model We now have implemented the ARIA role model. These classes will control which states and properties are exposed to end users. --- .../CodeGenerators/LibWeb/CMakeLists.txt | 1 + .../LibWeb/GenerateAriaRoles.cpp | 398 ++ Userland/Libraries/LibWeb/ARIA/AriaRoles.json | 4165 +++++++++++++++++ Userland/Libraries/LibWeb/ARIA/RoleType.cpp | 320 ++ Userland/Libraries/LibWeb/ARIA/RoleType.h | 61 + Userland/Libraries/LibWeb/CMakeLists.txt | 11 + 6 files changed, 4956 insertions(+) create mode 100644 Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateAriaRoles.cpp create mode 100644 Userland/Libraries/LibWeb/ARIA/AriaRoles.json create mode 100644 Userland/Libraries/LibWeb/ARIA/RoleType.cpp create mode 100644 Userland/Libraries/LibWeb/ARIA/RoleType.h diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/CMakeLists.txt b/Meta/Lagom/Tools/CodeGenerators/LibWeb/CMakeLists.txt index a56b9b87f0..e3d1b715bc 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/CMakeLists.txt +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/CMakeLists.txt @@ -6,5 +6,6 @@ lagom_tool(GenerateCSSPropertyID SOURCES GenerateCSSPropertyID.cpp LIB lagom_tool(GenerateCSSTransformFunctions SOURCES GenerateCSSTransformFunctions.cpp LIBS LibMain) lagom_tool(GenerateCSSValueID SOURCES GenerateCSSValueID.cpp LIBS LibMain) lagom_tool(GenerateWindowOrWorkerInterfaces SOURCES GenerateWindowOrWorkerInterfaces.cpp LIBS LibMain LibIDL) +lagom_tool(GenerateAriaRoles SOURCES GenerateAriaRoles.cpp LIBS LibMain) add_subdirectory(BindingsGenerator) diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateAriaRoles.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateAriaRoles.cpp new file mode 100644 index 0000000000..3900333882 --- /dev/null +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateAriaRoles.cpp @@ -0,0 +1,398 @@ +/* + * Copyright (c) 2023, Jonah Shafran + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include "GeneratorUtil.h" +#include +#include +#include +#include + +ErrorOr generate_header_file(JsonObject& roles_data, Core::File& file); +ErrorOr generate_implementation_file(JsonObject& roles_data, Core::File& file); + +ErrorOr serenity_main(Main::Arguments arguments) +{ + StringView generated_header_path; + StringView generated_implementation_path; + StringView identifiers_json_path; + + Core::ArgsParser args_parser; + args_parser.add_option(generated_header_path, "Path to the TransformFunctions header file to generate", "generated-header-path", 'h', "generated-header-path"); + args_parser.add_option(generated_implementation_path, "Path to the TransformFunctions implementation file to generate", "generated-implementation-path", 'c', "generated-implementation-path"); + args_parser.add_option(identifiers_json_path, "Path to the JSON file to read from", "json-path", 'j', "json-path"); + args_parser.parse(arguments); + + auto json = TRY(read_entire_file_as_json(identifiers_json_path)); + VERIFY(json.is_object()); + auto roles_data = json.as_object(); + + auto generated_header_file = TRY(Core::File::open(generated_header_path, Core::File::OpenMode::Write)); + auto generated_implementation_file = TRY(Core::File::open(generated_implementation_path, Core::File::OpenMode::Write)); + + TRY(generate_header_file(roles_data, *generated_header_file)); + TRY(generate_implementation_file(roles_data, *generated_implementation_file)); + + return 0; +} + +ErrorOr generate_header_file(JsonObject& roles_data, Core::File& file) +{ + StringBuilder builder; + SourceGenerator generator { builder }; + + generator.append(R"~~~( +#pragma once + +#include + +namespace Web::ARIA { +)~~~"); + + TRY(roles_data.try_for_each_member([&](auto& name, auto& value) -> ErrorOr { + VERIFY(value.is_object()); + JsonObject const& value_object = value.as_object(); + + auto class_definition_generator = TRY(generator.fork()); + class_definition_generator.set("spec_link"sv, value_object.get_deprecated_string("specLink"sv).value()); + class_definition_generator.set("description"sv, value_object.get_deprecated_string("description"sv).value()); + class_definition_generator.set("name"sv, name); + class_definition_generator.append(R"~~~( +// @spec_link@ +// @description@ +class @name@ : +)~~~"); + + JsonArray const& super_classes = value_object.get_array("superClassRoles"sv).value(); + bool first = true; + TRY(super_classes.try_for_each([&](JsonValue const& value) -> ErrorOr { + VERIFY(value.is_string()); + + class_definition_generator.append(first ? " "sv : ", "sv); + class_definition_generator.append(TRY(String::formatted("public {}", value.as_string()))); + first = false; + return {}; + })); + + class_definition_generator.append(R"~~~( +{ +public: + @name@(AriaData const&); + + virtual HashTable const& supported_states() const override; + virtual HashTable const& supported_properties() const override; + + virtual HashTable const& required_states() const override; + virtual HashTable const& required_properties() const override; + + virtual HashTable const& prohibited_properties() const override; + virtual HashTable const& prohibited_states() const override; + + virtual HashTable const& required_context_roles() const override; + virtual HashTable const& required_owned_elements() const override; + virtual bool accessible_name_required() const override; + virtual bool children_are_presentational() const override; + virtual DefaultValueType default_value_for_property_or_state(StateAndProperties) const override; +protected: + @name@(); +)~~~"); + + auto name_from_source = value.as_object().get("nameFromSource"sv).value(); + if (!name_from_source.is_null()) + class_definition_generator.append(R"~~~( +public: + virtual NameFromSource name_from_source() const override; +)~~~"); + class_definition_generator.appendln("};"); + return {}; + })); + + generator.appendln("}"); + + TRY(file.write_until_depleted((generator.as_string_view().bytes()))); + return {}; +} + +ErrorOr generate_hash_table_population(JsonArray const& values, StringView hash_table_name, StringView enum_class) +{ + StringBuilder builder; + TRY(values.try_for_each([&](auto& value) -> ErrorOr { + VERIFY(value.is_string()); + TRY(builder.try_appendff(" {}.set({}::{});\n", hash_table_name, enum_class, value.as_string())); + return {}; + })); + + return builder.to_string(); +} + +ErrorOr generate_hash_table_member(SourceGenerator& generator, StringView member_name, StringView hash_table_name, StringView enum_class, JsonArray const& values) +{ + auto member_generator = TRY(generator.fork()); + member_generator.set("member_name"sv, member_name); + member_generator.set("hash_table_name"sv, hash_table_name); + member_generator.set("enum_class"sv, enum_class); + TRY(member_generator.set("hash_table_size"sv, TRY(String::number(values.size())))); + + if (values.size() == 0) { + member_generator.append(R"~~~( +HashTable<@enum_class@> const& @name@::@member_name@() const +{ + static HashTable<@enum_class@> @hash_table_name@; + return @hash_table_name@; +} +)~~~"); + return {}; + } + + member_generator.append(R"~~~( +HashTable<@enum_class@> const& @name@::@member_name@() const +{ + static HashTable<@enum_class@> @hash_table_name@; + if (@hash_table_name@.is_empty()) { + @hash_table_name@.ensure_capacity(@hash_table_size@); +)~~~"); + member_generator.append(TRY(generate_hash_table_population(values, hash_table_name, enum_class))); + member_generator.append(R"~~~( + } + return @hash_table_name@; +} +)~~~"); + + return {}; +} + +StringView aria_name_to_enum_name(StringView name) +{ + if (name == "aria-activedescendant"sv) { + return "AriaActiveDescendant"sv; + } else if (name == "aria-atomic"sv) { + return "AriaAtomic"sv; + } else if (name == "aria-autocomplete"sv) { + return "AriaAutoComplete"sv; + } else if (name == "aria-busy"sv) { + return "AriaBusy"sv; + } else if (name == "aria-checked"sv) { + return "AriaChecked"sv; + } else if (name == "aria-colcount"sv) { + return "AriaColCount"sv; + } else if (name == "aria-colindex"sv) { + return "AriaColIndex"sv; + } else if (name == "aria-colspan"sv) { + return "AriaColSpan"sv; + } else if (name == "aria-controls"sv) { + return "AriaControls"sv; + } else if (name == "aria-current"sv) { + return "AriaCurrent"sv; + } else if (name == "aria-describedby"sv) { + return "AriaDescribedBy"sv; + } else if (name == "aria-details"sv) { + return "AriaDetails"sv; + } else if (name == "aria-disabled"sv) { + return "AriaDisabled"sv; + } else if (name == "aria-dropeffect"sv) { + return "AriaDropEffect"sv; + } else if (name == "aria-errormessage"sv) { + return "AriaErrorMessage"sv; + } else if (name == "aria-expanded"sv) { + return "AriaExpanded"sv; + } else if (name == "aria-flowto"sv) { + return "AriaFlowTo"sv; + } else if (name == "aria-grabbed"sv) { + return "AriaGrabbed"sv; + } else if (name == "aria-haspopup"sv) { + return "AriaHasPopup"sv; + } else if (name == "aria-hidden"sv) { + return "AriaHidden"sv; + } else if (name == "aria-invalid"sv) { + return "AriaInvalid"sv; + } else if (name == "aria-keyshortcuts"sv) { + return "AriaKeyShortcuts"sv; + } else if (name == "aria-label"sv) { + return "AriaLabel"sv; + } else if (name == "aria-labelledby"sv) { + return "AriaLabelledBy"sv; + } else if (name == "aria-level"sv) { + return "AriaLevel"sv; + } else if (name == "aria-live"sv) { + return "AriaLive"sv; + } else if (name == "aria-modal"sv) { + return "AriaModal"sv; + } else if (name == "aria-multiline"sv) { + return "AriaMultiLine"sv; + } else if (name == "aria-multiselectable"sv) { + return "AriaMultiSelectable"sv; + } else if (name == "aria-orientation"sv) { + return "AriaOrientation"sv; + } else if (name == "aria-owns"sv) { + return "AriaOwns"sv; + } else if (name == "aria-placeholder"sv) { + return "AriaPlaceholder"sv; + } else if (name == "aria-posinset"sv) { + return "AriaPosInSet"sv; + } else if (name == "aria-pressed"sv) { + return "AriaPressed"sv; + } else if (name == "aria-readonly"sv) { + return "AriaReadOnly"sv; + } else if (name == "aria-relevant"sv) { + return "AriaRelevant"sv; + } else if (name == "aria-required"sv) { + return "AriaRequired"sv; + } else if (name == "aria-roledescription"sv) { + return "AriaRoleDescription"sv; + } else if (name == "aria-rowcount"sv) { + return "AriaRowCount"sv; + } else if (name == "aria-rowindex"sv) { + return "AriaRowIndex"sv; + } else if (name == "aria-rowspan"sv) { + return "AriaRowSpan"sv; + } else if (name == "aria-selected"sv) { + return "AriaSelected"sv; + } else if (name == "aria-setsize"sv) { + return "AriaSetSize"sv; + } else if (name == "aria-sort"sv) { + return "AriaSort"sv; + } else if (name == "aria-valuemax"sv) { + return "AriaValueMax"sv; + } else if (name == "aria-valuemin"sv) { + return "AriaValueMin"sv; + } else if (name == "aria-valuenow"sv) { + return "AriaValueNow"sv; + } else if (name == "aria-valuetext"sv) { + return "AriaValueText"sv; + } else { + VERIFY_NOT_REACHED(); + } +} + +ErrorOr translate_aria_names_to_enum(JsonArray const& names) +{ + JsonArray translated_names; + TRY(names.try_for_each([&](JsonValue const& value) -> ErrorOr { + VERIFY(value.is_string()); + auto name = value.as_string(); + TRY(translated_names.append(aria_name_to_enum_name(name))); + return {}; + })); + return translated_names; +} + +ErrorOr generate_implementation_file(JsonObject& roles_data, Core::File& file) +{ + StringBuilder builder; + SourceGenerator generator { builder }; + + generator.append(R"~~~( +#include + +namespace Web::ARIA { +)~~~"); + + TRY(roles_data.try_for_each_member([&](auto& name, auto& value) -> ErrorOr { + VERIFY(value.is_object()); + + auto member_generator = TRY(generator.fork()); + member_generator.set("name"sv, name); + + JsonObject const& value_object = value.as_object(); + + JsonArray const& supported_states = TRY(translate_aria_names_to_enum(value_object.get_array("supportedStates"sv).value())); + TRY(generate_hash_table_member(member_generator, "supported_states"sv, "states"sv, "StateAndProperties"sv, supported_states)); + JsonArray const& supported_properties = TRY(translate_aria_names_to_enum(value_object.get_array("supportedProperties"sv).value())); + TRY(generate_hash_table_member(member_generator, "supported_properties"sv, "properties"sv, "StateAndProperties"sv, supported_properties)); + + JsonArray const& required_states = TRY(translate_aria_names_to_enum(value_object.get_array("requiredStates"sv).value())); + TRY(generate_hash_table_member(member_generator, "required_states"sv, "states"sv, "StateAndProperties"sv, required_states)); + JsonArray const& required_properties = TRY(translate_aria_names_to_enum(value_object.get_array("requiredProperties"sv).value())); + TRY(generate_hash_table_member(member_generator, "required_properties"sv, "properties"sv, "StateAndProperties"sv, required_properties)); + + JsonArray const& prohibited_states = TRY(translate_aria_names_to_enum(value_object.get_array("prohibitedStates"sv).value())); + TRY(generate_hash_table_member(member_generator, "prohibited_states"sv, "states"sv, "StateAndProperties"sv, prohibited_states)); + JsonArray const& prohibited_properties = TRY(translate_aria_names_to_enum(value_object.get_array("prohibitedProperties"sv).value())); + TRY(generate_hash_table_member(member_generator, "prohibited_properties"sv, "properties"sv, "StateAndProperties"sv, prohibited_properties)); + + JsonArray const& required_context_roles = value_object.get_array("requiredContextRoles"sv).value(); + TRY(generate_hash_table_member(member_generator, "required_context_roles"sv, "roles"sv, "Role"sv, required_context_roles)); + JsonArray const& required_owned_elements = value_object.get_array("requiredOwnedElements"sv).value(); + TRY(generate_hash_table_member(member_generator, "required_owned_elements"sv, "roles"sv, "Role"sv, required_owned_elements)); + + bool accessible_name_required = value_object.get_bool("accessibleNameRequired"sv).value(); + member_generator.set("accessible_name_required"sv, accessible_name_required ? "true"sv : "false"sv); + bool children_are_presentational = value_object.get_bool("childrenArePresentational"sv).value(); + member_generator.set("children_are_presentational", children_are_presentational ? "true"sv : "false"sv); + + JsonArray const& super_classes = value.as_object().get_array("superClassRoles"sv).value(); + member_generator.set("parent", super_classes.at(0).as_string()); + + member_generator.append(R"~~~( +@name@::@name@() { } + +@name@::@name@(AriaData const& data) + : @parent@(data) +{ +} + +bool @name@::accessible_name_required() const +{ + return @accessible_name_required@; +} + +bool @name@::children_are_presentational() const +{ + return @children_are_presentational@; +} +)~~~"); + + JsonObject const& implicit_value_for_role = value_object.get_object("implicitValueForRole"sv).value(); + if (implicit_value_for_role.size() == 0) { + member_generator.append(R"~~~( +DefaultValueType @name@::default_value_for_property_or_state(StateAndProperties) const +{ + return {}; +} +)~~~"); + } else { + member_generator.append(R"~~~( +DefaultValueType @name@::default_value_for_property_or_state(StateAndProperties state_or_property) const +{ + switch (state_or_property) { +)~~~"); + TRY(implicit_value_for_role.try_for_each_member([&](auto& name, auto& value) -> ErrorOr { + auto case_generator = TRY(member_generator.fork()); + VERIFY(value.is_string()); + case_generator.set("state_or_property"sv, aria_name_to_enum_name(name)); + case_generator.set("implicit_value"sv, value.as_string()); + case_generator.append(R"~~~( + case StateAndProperties::@state_or_property@: + return @implicit_value@; +)~~~"); + return {}; + })); + member_generator.append(R"~~~( + default: + return {}; + } +} +)~~~"); + } + + JsonValue const& name_from_source = value.as_object().get("nameFromSource"sv).value(); + if (!name_from_source.is_null()) { + member_generator.set("name_from_source"sv, name_from_source.as_string()); + member_generator.append(R"~~~( +NameFromSource @name@::name_from_source() const +{ + return NameFromSource::@name_from_source@; +} +)~~~"); + } + + return {}; + })); + + generator.append("}"); + + TRY(file.write_until_depleted(generator.as_string_view().bytes())); + return {}; +} diff --git a/Userland/Libraries/LibWeb/ARIA/AriaRoles.json b/Userland/Libraries/LibWeb/ARIA/AriaRoles.json new file mode 100644 index 0000000000..fec69c3b12 --- /dev/null +++ b/Userland/Libraries/LibWeb/ARIA/AriaRoles.json @@ -0,0 +1,4165 @@ +{ + "Structure": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#structure", + "description": "A document structural element.", + "superClassRoles": [ + "RoleType" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": null, + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Widget": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#widget", + "description": "An interactive component of a graphical user interface (GUI).", + "superClassRoles": [ + "RoleType" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": null, + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Window": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#window", + "description": "A browser or application window.", + "superClassRoles": [ + "RoleType" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-modal", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Composite": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#composite", + "description": "A widget that may contain navigable descendants or owned children.", + "superClassRoles": [ + "Widget" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Application": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#application", + "description": "A structure containing one or more focusable elements requiring user input, such as keyboard or gesture events, that do not follow a standard interaction pattern supported by a widget role.", + "superClassRoles": [ + "Structure" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-expanded", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Document": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#document", + "description": "An element containing content that assistive technology users may want to browse in a reading mode.", + "superClassRoles": [ + "Structure" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Generic": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#generic", + "description": "A nameless container element that has no semantic meaning on its own.", + "superClassRoles": [ + "Structure" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-live", + "aria-owns", + "aria-relevant" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [ + "aria-label", + "aria-labelledby", + "aria-roledescription" + ], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Prohibited", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Presentation": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#presentation", + "description": "An element whose implicit native role semantics will not be mapped to the accessibility API. See synonym none.", + "superClassRoles": [ + "Structure" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [ + "aria-label", + "aria-labelledby" + ], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Prohibited", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Range": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#range", + "description": "An element representing a range of values.", + "superClassRoles": [ + "Structure" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid", + "aria-valuemax", + "aria-valuemin", + "aria-valuenow", + "aria-valuetext" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "RowGroup": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#rowgroup", + "description": "A structure containing one or more row elements in a tabular container.", + "superClassRoles": [ + "Structure" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [ + "grid", + "table", + "treegrid" + ], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Section": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#section", + "description": "A renderable structural containment unit in a document or application.", + "superClassRoles": [ + "Structure" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": null, + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Input": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#input", + "description": "A generic type of widget that allows user input.", + "superClassRoles": [ + "Widget" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "SectionHead": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#sectionhead", + "description": "A structure that labels or summarizes the topic of its related section.", + "superClassRoles": [ + "Structure" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "FocusableSeparator": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#separator", + "description": "A divider that separates and distinguishes sections of content or groups of menuitems.\n// NOTE: This is not an actual aria role, but Separator has distinct behavior and inheritance\n// depending on if it is focusable or not, so it is implemented as two classes.\n// Also see NonFocusableSeparator.", + "superClassRoles": [ + "Widget" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-orientation", + "aria-owns", + "aria-relevant", + "aria-roledescription", + "aria-valuemax", + "aria-valuemin", + "aria-valuetext" + ], + "requiredStates": [], + "requiredProperties": [ + "aria-valuenow" + ], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": true, + "implicitValueForRole": { + "aria-orientation": "AriaOrientation::Horizontal", + "aria-valuemin": "0.0", + "aria-valuemax": "100.0" + } + }, + "NonFocusableSeparator": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#separator", + "description": "A divider that separates and distinguishes sections of content or groups of menuitems.\n// NOTE: This is not an actual aria role, but Separator has distinct behavior and inheritance\n// depending on if it is focusable or not, so it is implemented as two classes.\n// Also see FocusableSeparator.", + "superClassRoles": [ + "Structure" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-grabbed", + "aria-hidden", + "aria-invalid", + "aria-orientation" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": true, + "implicitValueForRole": { + "aria-orientation": "AriaOrientation::Horizontal" + } + }, + "Article": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#article", + "description": "A section of a page that consists of a composition that forms an independent part of a document, page, or site.", + "superClassRoles": [ + "Document" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-posinset", + "aria-relevant", + "aria-roledescription", + "aria-setsize" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Meter": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#meter", + "description": "An element that represents a scalar measurement within a known range, or a fractional value. See related progressbar.", + "superClassRoles": [ + "Range" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription", + "aria-valuemax", + "aria-valuemin", + "aria-valuenow", + "aria-valuetext" + ], + "requiredStates": [], + "requiredProperties": [ + "aria-valuenow" + ], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": true, + "implicitValueForRole": { + "aria-valuemin": "0.0", + "aria-valuemax": "100.0" + } + }, + "Progressbar": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#progressbar", + "description": "An element that displays the progress status for tasks that take a long time.\n// NOTE: Progresbar also inherits from Widgetfrom Cell, but we can't do that in C++ due to Progressbar already inheriting from Widget\n// This is fine because behavior is still correct and is() will still work as expected.", + "superClassRoles": [ + "Range" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription", + "aria-valuemax", + "aria-valuemin", + "aria-valuenow", + "aria-valuetext" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": true, + "implicitValueForRole": { + "aria-valuemin": "0.0", + "aria-valuemax": "100.0" + } + }, + "Scrollbar": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#scrollbar", + "description": "A graphical object that controls the scrolling of content within a viewing area, regardless of whether the content is fully displayed within the viewing area.", + "superClassRoles": [ + "Range", + "Widget" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-orientation", + "aria-owns", + "aria-relevant", + "aria-roledescription", + "aria-valuemax", + "aria-valuemin", + "aria-valuetext" + ], + "requiredStates": [], + "requiredProperties": [ + "aria-controls", + "aria-valuenow" + ], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": true, + "implicitValueForRole": { + "aria-orientation": "AriaOrientation::Vertical", + "aria-valuemin": "0.0", + "aria-valuemax": "100.0" + } + }, + "Slider": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#slider", + "description": "An input where the user selects a value from within a given range.", + "superClassRoles": [ + "Input", + "Range" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-orientation", + "aria-owns", + "aria-relevant", + "aria-readonly", + "aria-roledescription", + "aria-valuemax", + "aria-valuemin" + ], + "requiredStates": [], + "requiredProperties": [ + "aria-valuenow" + ], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": true, + "implicitValueForRole": { + "aria-orientation": "AriaOrientation::Horizontal", + "aria-valuemin": "0.0", + "aria-valuemax": "100.0" + } + }, + "SpinButton": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#spinbutton", + "description": "A form of range that expects the user to select from among discrete choices.", + "superClassRoles": [ + "Composite", + "Input", + "Range" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-readonly", + "aria-required", + "aria-relevant", + "aria-roledescription", + "aria-valuemax", + "aria-valuemin", + "aria-valuenow", + "aria-valuetext" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": { + "aria-valuenow": "0.0" + } + }, + "Alert": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#alert", + "description": "A type of live region with important, and usually time-sensitive, information. See related alertdialog and status.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-invalid", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-modal", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": { + "aria-live": "AriaLive::Assertive", + "aria-atomic": "true" + } + }, + "BlockQuote": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#blockquote", + "description": "A section of content that is quoted from another source.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Caption": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#caption", + "description": "Visible content that names, and may also describe, a figure, table, grid, or treegrid.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [ + "aria-label", + "aria-labelledby" + ], + "requiredContextRoles": [ + "figure", + "grid", + "table", + "treegrid" + ], + "requiredOwnedElements": [], + "nameFromSource": "Prohibited", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Cell": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#cell", + "description": "A cell in a tabular container. See related gridcell.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-colindex", + "aria-colspan", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription", + "aria-rowindex", + "aria-rowspan" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [ + "row" + ], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Code": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#code", + "description": "A section whose content represents a fragment of computer code.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [ + "aria-label", + "aria-labelledby" + ], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Prohibited", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Definition": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#definition", + "description": "A definition of a term or concept. See related term.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Deletion": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#deletion", + "description": "A deletion contains content that is marked as removed or content that is being suggested for removal. See related insertion.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [ + "aria-label", + "aria-labelledby" + ], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Prohibited", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Emphasis": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#emphasis", + "description": "One or more emphasized characters. See related strong.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [ + "aria-label", + "aria-labelledby" + ], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Prohibited", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Figure": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#figure", + "description": "A perceivable section of content that typically contains a graphical document, images, code snippets, or example text. The parts of a figure MAY be user-navigable.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Group": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#group", + "description": "A set of user interface objects that is not intended to be included in a page summary or table of contents by assistive technologies.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Img": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#img", + "description": "A container for a collection of elements that form an image.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": true, + "implicitValueForRole": {} + }, + "Insertion": { + "specLink": "", + "description": "", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [ + "aria-label", + "aria-labelledby" + ], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Prohibited", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Landmark": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#landmark", + "description": "A perceivable section containing content that is relevant to a specific, author-specified purpose and sufficiently important that users will likely want to be able to navigate to the section easily and to have it listed in a summary of the page. Such a page summary could be generated dynamically by a user agent or assistive technology.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "List": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#list", + "description": "A section containing listitem elements. See related listbox.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [ + "listitem" + ], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "ListItem": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#listitem", + "description": "A single item in a list or directory.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-level", + "aria-live", + "aria-owns", + "aria-posinset", + "aria-relevant", + "aria-roledescription", + "aria-setsize" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [ + "directory", + "list" + ], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Log": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#log", + "description": "A type of live region where new information is added in meaningful order and old information may disappear. See related marquee.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": { + "aria-live": "AriaLive::Polite" + } + }, + "Marquee": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#marquee", + "description": "A type of live region where non-essential information changes frequently. See related log.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Math": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#math", + "description": "Content that represents a mathematical expression.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Note": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#note", + "description": "A section whose content is parenthetic or ancillary to the main content of the resource.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Paragraph": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#paragraph", + "description": "A paragraph of content.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [ + "aria-label", + "aria-labelledby" + ], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Prohibited", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Status": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#status", + "description": "A type of live region whose content is advisory information for the user but is not important enough to justify an alert, often but not necessarily presented as a status bar.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": { + "aria-live": "AriaLive::Polite", + "aria-atomic": "true" + } + }, + "Strong": { + "specLink": "", + "description": "", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [ + "aria-label", + "aria-labelledby" + ], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Prohibited", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Subscript": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#subscript", + "description": "One or more subscripted characters. See related superscript.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [ + "aria-label", + "aria-labelledby" + ], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Prohibited", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Superscript": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#superscript", + "description": "One or more superscripted characters. See related superscript.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [ + "aria-label", + "aria-labelledby" + ], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Prohibited", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Table": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#table", + "description": "A section containing data arranged in rows and columns. See related grid.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-colcount", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription", + "aria-rowcount" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [ + "row" + ], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "TabPanel": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#tabpanel", + "description": "A container for the resources associated with a tab, where each tab is contained in a tablist.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Term": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#term", + "description": "A word or phrase with a corresponding definition. See related definition.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Time": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#time", + "description": "An element that represents a specific point in time.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Tooltip": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#tooltip", + "description": "A contextual popup that displays a description for an element.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Dialog": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#dialog", + "description": "A dialog is a descendant window of the primary window of a web application. For HTML pages, the primary application window is the entire web document, i.e., the body element.", + "superClassRoles": [ + "Window" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-modal", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "AlertDialog": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#alertdialog", + "description": "A type of dialog that contains an alert message, where initial focus goes to an element within the dialog. See related alert and dialog.", + "superClassRoles": [ + "Alert", + "Dialog" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "GridCell": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#gridcell", + "description": "A cell in a grid or treegrid.", + "superClassRoles": [ + "Cell", + "Widget" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-expanded", + "aria-grabbed", + "aria-hidden", + "aria-invalid", + "aria-selected" + ], + "supportedProperties": [ + "aria-atomic", + "aria-colindex", + "aria-colspan", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-readonly", + "aria-relevant", + "aria-required", + "aria-roledescription", + "aria-rowindex", + "aria-rowspan" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [ + "row" + ], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "ColumnHeader": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#columnheader", + "description": "A cell containing header information for a column.\n// NOTE: ColumnHeader also inherits from Cell, but we can't do that in C++ due to GridCell already inheriting from Cell\n// This is fine because behavior is still correct and is() will still work as expected.", + "superClassRoles": [ + "GridCell", + "SectionHead" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-expanded", + "aria-grabbed", + "aria-hidden", + "aria-invalid", + "aria-selected" + ], + "supportedProperties": [ + "aria-atomic", + "aria-colindex", + "aria-colspan", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-required", + "aria-roledescription", + "aria-rowindex", + "aria-rowspan", + "aria-sort" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [ + "row" + ], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "RowHeader": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#rowheader", + "description": "A cell containing header information for a row.\n// NOTE: RowHeader also inherits from Cell, but we can't do that in C++ due to GridCell already inheriting from Cell\n// This is fine because behavior is still correct and is() will still work as expected.", + "superClassRoles": [ + "GridCell", + "SectionHead" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-expanded", + "aria-grabbed", + "aria-hidden", + "aria-invalid", + "aria-selected" + ], + "supportedProperties": [ + "aria-atomic", + "aria-colindex", + "aria-colspan", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-required", + "aria-roledescription", + "aria-rowindex", + "aria-rowspan", + "aria-sort" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [ + "row" + ], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Row": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#row", + "description": "A row of cells in a tabular container.", + "superClassRoles": [ + "Group", + "Widget" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-expanded", + "aria-grabbed", + "aria-hidden", + "aria-invalid", + "aria-selected" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-controls", + "aria-colindex", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-expanded", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-level", + "aria-live", + "aria-owns", + "aria-posinset", + "aria-relevant", + "aria-roledescription", + "aria-rowindex", + "aria-setsize" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [ + "grid", + "rowgroup", + "table", + "treegrid" + ], + "requiredOwnedElements": [ + "cell", + "columnheader", + "gridcell", + "rowheader" + ], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Select": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#select", + "description": "A form widget that allows the user to make selections from a set of choices.", + "superClassRoles": [ + "Composite", + "Group" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-orientation", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Toolbar": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#toolbar", + "description": "A collection of commonly used function buttons or controls represented in compact visual form.", + "superClassRoles": [ + "Group" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-orientation", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": { + "aria-orientation": "AriaOrientation::Horizontal" + } + }, + "ListBox": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#listbox", + "description": "A widget that allows the user to select one or more items from a list of choices. See related combobox and list.", + "superClassRoles": [ + "Select" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-expanded", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-expanded", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-multiselectable", + "aria-orientation", + "aria-owns", + "aria-readonly", + "aria-relevant", + "aria-roledescription", + "aria-required" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [ + "option" + ], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": { + "aria-orientation": "AriaOrientation::Vertical" + } + }, + "Menu": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#menu", + "description": "A type of widget that offers a list of choices to the user.", + "superClassRoles": [ + "Select" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-orientation", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [ + "menuitem", + "menuitemradio", + "menuitemcheckbox" + ], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": { + "aria-orientation": "AriaOrientation::Vertical" + } + }, + "RadioGroup": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#radiogroup", + "description": "A group of radio buttons.", + "superClassRoles": [ + "Select" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-orientation", + "aria-owns", + "aria-readonly", + "aria-relevant", + "aria-required", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [ + "radio" + ], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Tree": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#tree", + "description": "A widget that allows the user to select one or more items from a hierarchically organized collection.", + "superClassRoles": [ + "Select" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-multiselectable", + "aria-orientation", + "aria-owns", + "aria-relevant", + "aria-required", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [ + "treeitem" + ], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": { + "aria-orientation": "AriaOrientation::Vertical" + } + }, + "MenuBar": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#menubar", + "description": "A presentation of menu that usually remains visible and is usually presented horizontally.", + "superClassRoles": [ + "Menu" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [ + "menuitem", + "menuitemcheckbox", + "menuitemradio" + ], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": { + "aria-orientation": "AriaOrientation::Horizontal" + } + }, + "TreeGrid": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#treegrid", + "description": "A grid whose rows can be expanded and collapsed in the same manner as for a tree.", + "superClassRoles": [ + "Row" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-colcount", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-multiselectable", + "aria-orientation", + "aria-owns", + "aria-readonly", + "aria-relevant", + "aria-required", + "aria-roledescription", + "aria-rowcount" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Banner": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#banner", + "description": "https://www.w3.org/TR/wai-aria-1.2/#banner", + "superClassRoles": [ + "Landmark" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Complementary": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#complementary", + "description": "A landmark that is designed to be complementary to the main content at a similar level in the DOM hierarchy, but remaining meaningful when separated from the main content.", + "superClassRoles": [ + "Landmark" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "ContentInfo": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#contentinfo", + "description": "A landmark that contains information about the parent document.", + "superClassRoles": [ + "Landmark" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Form": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#form", + "description": "A landmark region that contains a collection of items and objects that, as a whole, combine to create a form. See related search.", + "superClassRoles": [ + "Landmark" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Main": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#main", + "description": "A landmark containing the main content of a document.", + "superClassRoles": [ + "Landmark" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Navigation": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#navigation", + "description": "A landmark containing a collection of navigational elements (usually links) for navigating the document or related documents.", + "superClassRoles": [ + "Landmark" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Region": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#region", + "description": "A landmark containing content that is relevant to a specific, author-specified purpose and sufficiently important that users will likely want to be able to navigate to the section easily and to have it listed in a summary of the page. Such a page summary could be generated dynamically by a user agent or assistive technology.", + "superClassRoles": [ + "Landmark" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Search": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#search", + "description": "A landmark region that contains a collection of items and objects that, as a whole, combine to create a search facility. See related form and searchbox.", + "superClassRoles": [ + "Landmark" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Directory": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#directory", + "description": "[Deprecated in ARIA 1.2] A list of references to members of a group, such as a static table of contents.", + "superClassRoles": [ + "List" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Feed": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#feed", + "description": "A scrollable list of articles where scrolling may cause articles to be added to or removed from either end of the list.", + "superClassRoles": [ + "List" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [ + "article" + ], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + + "Option": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#option", + "description": "A selectable item in a listbox.", + "superClassRoles": [ + "Input" + ], + "supportedStates": [ + "aria-busy", + "aria-checked", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-posinset", + "aria-relevant", + "aria-roledescription", + "aria-setsize" + ], + "requiredStates": [ + "aria-selected" + ], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [ + "group", + "listbox" + ], + "requiredOwnedElements": [], + "nameFromSource": null, + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "TreeItem": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#treeitem", + "description": "An option item of a tree. This is an element within a tree that may be expanded or collapsed if it contains a sub-level group of tree item elements.", + "superClassRoles": [ + "ListItem", + "Option" + ], + "supportedStates": [ + "aria-busy", + "aria-checked", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid", + "aria-selected" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-level", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription", + "aria-setsize" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Timer": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#timer", + "description": "A type of live region containing a numerical counter which indicates an amount of elapsed time from a start point, or the time remaining until an end point.", + "superClassRoles": [ + "Status" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": { + "aria-live": "AriaLive::Off" + } + }, + "Grid": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#grid", + "description": "A composite widget containing a collection of one or more rows with one or more cells where some or all cells in the grid are focusable by using methods of two-dimensional navigation, such as directional arrow keys.", + "superClassRoles": [ + "Composite", + "Table" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-colcount", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-multiselectable", + "aria-owns", + "aria-readonly", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [ + "row" + ], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Heading": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#heading", + "description": "A heading for a section of the page.", + "superClassRoles": [ + "SectionHead" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-level", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Tab": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#tab", + "description": "A grouping label providing a mechanism for selecting the tab content that is to be rendered to the user.", + "superClassRoles": [ + "SectionHead", + "Widget" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-expanded", + "aria-grabbed", + "aria-hidden", + "aria-invalid", + "aria-selected" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-posinset", + "aria-relevant", + "aria-roledescription", + "aria-setsize" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [ + "tablist" + ], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": false, + "childrenArePresentational": true, + "implicitValueForRole": { + "aria-selected": "false" + } + }, + + "Command": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#command", + "description": "A form of widget that performs an action but does not receive input data.", + "superClassRoles": [ + "Widget" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Button": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#button", + "description": "An input that allows for user-triggered actions when clicked or pressed. See related link.", + "superClassRoles": [ + "Command" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-expanded", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-pressed", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": true, + "childrenArePresentational": true, + "implicitValueForRole": {} + }, + "Link": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#link", + "description": "An interactive reference to an internal or external resource that, when activated, causes the user agent to navigate to that resource. See related button.", + "superClassRoles": [ + "Command" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-expanded", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-errormessage", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "MenuItem": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#menuitem", + "description": "An option in a set of choices contained by a menu or menubar.", + "superClassRoles": [ + "Command" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-expanded", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-posinset", + "aria-relevant", + "aria-roledescription", + "aria-setsize" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [ + "group", + "menu", + "menubar" + ], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "MenuItemCheckBox": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#menuitemcheckbox", + "description": "A menuitem with a checkable state whose possible values are true, false, or mixed.", + "superClassRoles": [ + "MenuItem" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-posinset", + "aria-relevant", + "aria-roledescription", + "aria-setsize" + ], + "requiredStates": [ + "aria-checked" + ], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [ + "group", + "menu", + "menubar" + ], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": true, + "childrenArePresentational": true, + "implicitValueForRole": {} + }, + "MenuItemRadio": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#menuitemradio", + "description": "A checkable menuitem in a set of elements with the same role, only one of which can be checked at a time.", + "superClassRoles": [ + "MenuItemCheckBox" + ], + "supportedStates": [ + "aria-busy", + "aria-checked", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-posinset", + "aria-relevant", + "aria-roledescription", + "aria-setsize" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [ + "group", + "menu", + "menubar" + ], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": true, + "childrenArePresentational": true, + "implicitValueForRole": {} + }, + "CheckBox": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#checkbox", + "description": "A checkable input that has three possible values: true, false, or mixed.", + "superClassRoles": [ + "Input" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-expanded", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-readonly", + "aria-relevant", + "aria-required", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": true, + "childrenArePresentational": true, + "implicitValueForRole": {} + }, + "ComboBox": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#combobox", + "description": "An input that controls another element, such as a listbox or grid, that can dynamically pop up to help the user set the value of the input.", + "superClassRoles": [ + "Input" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-autocomplete", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-readonly", + "aria-relevant", + "aria-required", + "aria-roledescription" + ], + "requiredStates": [ + "aria-expanded" + ], + "requiredProperties": [ + "aria-controls" + ], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": { + "aria-haspopup": "AriaHasPopup::Listbox" + } + }, + "Radio": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#radio", + "description": "A checkable input in a group of elements with the same role, only one of which can be checked at a time.", + "superClassRoles": [ + "Input" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-posinset", + "aria-relevant", + "aria-roledescription", + "aria-setsize" + ], + "requiredStates": [ + "aria-checked" + ], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": true, + "childrenArePresentational": true, + "implicitValueForRole": {} + }, + "TextBox": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#textbox", + "description": "A type of input that allows free-form text as its value.", + "superClassRoles": [ + "Input" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-autocomplete", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-multiline", + "aria-owns", + "aria-placeholder", + "aria-readonly", + "aria-relevant", + "aria-required", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "Switch": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#switch", + "description": "A type of checkbox that represents on/off values, as opposed to checked/unchecked values. See related checkbox.", + "superClassRoles": [ + "CheckBox" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-expanded", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-owns", + "aria-relevant", + "aria-required", + "aria-roledescription" + ], + "requiredStates": [ + "aria-checked" + ], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "AuthorContent", + "accessibleNameRequired": true, + "childrenArePresentational": true, + "implicitValueForRole": {} + }, + "SearchBox": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#searchbox", + "description": "A type of textbox intended for specifying search criteria. See related textbox and search.", + "superClassRoles": [ + "TextBox" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-autocomplete", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-errormessage", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-multiline", + "aria-owns", + "aria-placeholder", + "aria-readonly", + "aria-relevant", + "aria-required", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [], + "nameFromSource": "Author", + "accessibleNameRequired": true, + "childrenArePresentational": false, + "implicitValueForRole": {} + }, + "TabList": { + "specLink": "https://www.w3.org/TR/wai-aria-1.2/#tablist", + "description": "A list of tab elements, which are references to tabpanel elements.", + "superClassRoles": [ + "Composite" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-disabled", + "aria-grabbed", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-activedescendant", + "aria-atomic", + "aria-controls", + "aria-describedby", + "aria-details", + "aria-dropeffect", + "aria-flowto", + "aria-haspopup", + "aria-keyshortcuts", + "aria-label", + "aria-labelledby", + "aria-live", + "aria-multiselectable", + "aria-orientation", + "aria-owns", + "aria-relevant", + "aria-roledescription" + ], + "requiredStates": [], + "requiredProperties": [], + "prohibitedStates": [], + "prohibitedProperties": [], + "requiredContextRoles": [], + "requiredOwnedElements": [ + "tab" + ], + "nameFromSource": "Author", + "accessibleNameRequired": false, + "childrenArePresentational": false, + "implicitValueForRole": { + "aria-orientation": "AriaOrientation::Horizontal" + } + } +} diff --git a/Userland/Libraries/LibWeb/ARIA/RoleType.cpp b/Userland/Libraries/LibWeb/ARIA/RoleType.cpp new file mode 100644 index 0000000000..145c5bd549 --- /dev/null +++ b/Userland/Libraries/LibWeb/ARIA/RoleType.cpp @@ -0,0 +1,320 @@ +/* + * Copyright (c) 2023, Jonah Shafran + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +namespace Web::ARIA { + +RoleType::RoleType(AriaData const& data) + : m_data(data) +{ +} + +constexpr StateAndProperties supported_state_array[] = { + StateAndProperties::AriaBusy, + StateAndProperties::AriaCurrent, + StateAndProperties::AriaDisabled, + StateAndProperties::AriaGrabbed, + StateAndProperties::AriaHidden, + StateAndProperties::AriaInvalid +}; +constexpr StateAndProperties supported_properties_array[] = { + StateAndProperties::AriaAtomic, + StateAndProperties::AriaControls, + StateAndProperties::AriaDescribedBy, + StateAndProperties::AriaDetails, + StateAndProperties::AriaDropEffect, + StateAndProperties::AriaFlowTo, + StateAndProperties::AriaHasPopup, + StateAndProperties::AriaKeyShortcuts, + StateAndProperties::AriaLabel, + StateAndProperties::AriaLabelledBy, + StateAndProperties::AriaLive, + StateAndProperties::AriaOwns, + StateAndProperties::AriaRelevant, + StateAndProperties::AriaRoleDescription +}; + +HashTable const& RoleType::supported_states() const +{ + static HashTable states; + if (states.is_empty()) + states.set_from(supported_state_array); + return states; +} + +HashTable const& RoleType::supported_properties() const +{ + static HashTable properties; + if (properties.is_empty()) + properties.set_from(supported_properties_array); + return properties; +} + +HashTable const& RoleType::required_states() const +{ + static HashTable states; + return states; +} + +HashTable const& RoleType::required_properties() const +{ + static HashTable properties; + return properties; +} + +HashTable const& RoleType::prohibited_properties() const +{ + static HashTable properties; + return properties; +} + +HashTable const& RoleType::prohibited_states() const +{ + static HashTable states; + return states; +} + +HashTable const& RoleType::required_context_roles() const +{ + static HashTable roles; + return roles; +} + +HashTable const& RoleType::required_owned_elements() const +{ + static HashTable roles; + return roles; +} + +ErrorOr RoleType::serialize_as_json(JsonObjectSerializer& object) const +{ + auto state_object = TRY(object.add_object("state"sv)); + for (auto const state : supported_states()) { + auto value = TRY(ARIA::state_or_property_to_string_value(state, m_data, default_value_for_property_or_state(state))); + TRY(state_object.add(ARIA::state_or_property_to_string(state), value)); + } + TRY(state_object.finish()); + + auto properties_object = TRY(object.add_object("properties"sv)); + for (auto const property : supported_properties()) { + auto value = TRY(ARIA::state_or_property_to_string_value(property, m_data, default_value_for_property_or_state(property))); + TRY(properties_object.add(ARIA::state_or_property_to_string(property), value)); + } + TRY(properties_object.finish()); + + auto required_states_object = TRY(object.add_object("required_state"sv)); + for (auto const state : required_states()) { + auto value = TRY(ARIA::state_or_property_to_string_value(state, m_data, default_value_for_property_or_state(state))); + TRY(required_states_object.add(ARIA::state_or_property_to_string(state), value)); + } + TRY(required_states_object.finish()); + + auto required_properties_object = TRY(object.add_object("required_properties"sv)); + for (auto const property : required_properties()) { + auto value = TRY(ARIA::state_or_property_to_string_value(property, m_data, default_value_for_property_or_state(property))); + TRY(required_properties_object.add(ARIA::state_or_property_to_string(property), value)); + } + TRY(required_properties_object.finish()); + + auto prohibited_states_object = TRY(object.add_object("prohibited_state"sv)); + for (auto const state : prohibited_states()) { + auto value = TRY(ARIA::state_or_property_to_string_value(state, m_data, default_value_for_property_or_state(state))); + TRY(prohibited_states_object.add(ARIA::state_or_property_to_string(state), value)); + } + TRY(prohibited_states_object.finish()); + + auto prohibited_properties_object = TRY(object.add_object("prohibited_properties"sv)); + for (auto const property : required_properties()) { + auto value = TRY(ARIA::state_or_property_to_string_value(property, m_data, default_value_for_property_or_state(property))); + TRY(prohibited_properties_object.add(ARIA::state_or_property_to_string(property), value)); + } + TRY(prohibited_properties_object.finish()); + + return {}; +} + +ErrorOr> RoleType::build_role_object(Role role, bool focusable, AriaData const& data) +{ + if (is_abstract_role(role)) + return Error::from_string_view("Cannot construct a role object for an abstract role."sv); + + switch (role) { + case Role::alert: + return adopt_nonnull_own_or_enomem(new (nothrow) Alert(data)); + case Role::alertdialog: + return adopt_nonnull_own_or_enomem(static_cast((new (nothrow) AlertDialog(data)))); + case Role::application: + return adopt_nonnull_own_or_enomem(new (nothrow) Application(data)); + case Role::article: + return adopt_nonnull_own_or_enomem(new (nothrow) Article(data)); + case Role::banner: + return adopt_nonnull_own_or_enomem(new (nothrow) Banner(data)); + case Role::blockquote: + return adopt_nonnull_own_or_enomem(new (nothrow) BlockQuote(data)); + case Role::button: + return adopt_nonnull_own_or_enomem(new (nothrow) Button(data)); + case Role::caption: + return adopt_nonnull_own_or_enomem(new (nothrow) Caption(data)); + case Role::cell: + return adopt_nonnull_own_or_enomem(new (nothrow) Cell(data)); + case Role::checkbox: + return adopt_nonnull_own_or_enomem(new (nothrow) CheckBox(data)); + case Role::code: + return adopt_nonnull_own_or_enomem(new (nothrow) Code(data)); + case Role::columnheader: + return adopt_nonnull_own_or_enomem(static_cast(new (nothrow) ColumnHeader(data))); + case Role::combobox: + return adopt_nonnull_own_or_enomem(new (nothrow) ComboBox(data)); + case Role::complementary: + return adopt_nonnull_own_or_enomem(new (nothrow) Complementary(data)); + case Role::composite: + return adopt_nonnull_own_or_enomem(new (nothrow) ContentInfo(data)); + case Role::definition: + return adopt_nonnull_own_or_enomem(new (nothrow) Definition(data)); + case Role::deletion: + return adopt_nonnull_own_or_enomem(new (nothrow) Deletion(data)); + case Role::dialog: + return adopt_nonnull_own_or_enomem(new (nothrow) Dialog(data)); + case Role::directory: + return adopt_nonnull_own_or_enomem(new (nothrow) Directory(data)); + case Role::document: + return adopt_nonnull_own_or_enomem(new (nothrow) Document(data)); + case Role::emphasis: + return adopt_nonnull_own_or_enomem(new (nothrow) Emphasis(data)); + case Role::feed: + return adopt_nonnull_own_or_enomem(new (nothrow) Feed(data)); + case Role::figure: + return adopt_nonnull_own_or_enomem(new (nothrow) Figure(data)); + case Role::form: + return adopt_nonnull_own_or_enomem(new (nothrow) Form(data)); + case Role::generic: + return adopt_nonnull_own_or_enomem(new (nothrow) Generic(data)); + case Role::grid: + return adopt_nonnull_own_or_enomem(static_cast(new (nothrow) Grid(data))); + case Role::gridcell: + return adopt_nonnull_own_or_enomem(static_cast(new (nothrow) GridCell(data))); + case Role::group: + return adopt_nonnull_own_or_enomem(new (nothrow) Group(data)); + case Role::heading: + return adopt_nonnull_own_or_enomem(new (nothrow) Heading(data)); + case Role::img: + return adopt_nonnull_own_or_enomem(new (nothrow) Img(data)); + case Role::input: + return adopt_nonnull_own_or_enomem(new (nothrow) Input(data)); + case Role::insertion: + return adopt_nonnull_own_or_enomem(new (nothrow) Insertion(data)); + case Role::landmark: + return adopt_nonnull_own_or_enomem(new (nothrow) Landmark(data)); + case Role::link: + return adopt_nonnull_own_or_enomem(new (nothrow) Link(data)); + case Role::list: + return adopt_nonnull_own_or_enomem(new (nothrow) List(data)); + case Role::listbox: + return adopt_nonnull_own_or_enomem(static_cast(new (nothrow) ListBox(data))); + case Role::listitem: + return adopt_nonnull_own_or_enomem(new (nothrow) ListItem(data)); + case Role::log: + return adopt_nonnull_own_or_enomem(new (nothrow) Log(data)); + case Role::main: + return adopt_nonnull_own_or_enomem(new (nothrow) Main(data)); + case Role::marquee: + return adopt_nonnull_own_or_enomem(new (nothrow) Marquee(data)); + case Role::math: + return adopt_nonnull_own_or_enomem(new (nothrow) Math(data)); + case Role::meter: + return adopt_nonnull_own_or_enomem(new (nothrow) Meter(data)); + case Role::menu: + return adopt_nonnull_own_or_enomem(static_cast(new (nothrow) Menu(data))); + case Role::menubar: + return adopt_nonnull_own_or_enomem(static_cast(new (nothrow) MenuBar(data))); + case Role::menuitem: + return adopt_nonnull_own_or_enomem(new (nothrow) MenuItem(data)); + case Role::menuitemcheckbox: + return adopt_nonnull_own_or_enomem(new (nothrow) MenuItemCheckBox(data)); + case Role::menuitemradio: + return adopt_nonnull_own_or_enomem(new (nothrow) MenuItemRadio(data)); + case Role::navigation: + return adopt_nonnull_own_or_enomem(new (nothrow) Navigation(data)); + case Role::note: + return adopt_nonnull_own_or_enomem(new (nothrow) Note(data)); + case Role::option: + return adopt_nonnull_own_or_enomem(new (nothrow) Option(data)); + case Role::paragraph: + return adopt_nonnull_own_or_enomem(new (nothrow) Paragraph(data)); + case Role::presentation: + return adopt_nonnull_own_or_enomem(new (nothrow) Presentation(data)); + case Role::progressbar: + return adopt_nonnull_own_or_enomem(new (nothrow) Progressbar(data)); + case Role::radio: + return adopt_nonnull_own_or_enomem(new (nothrow) Radio(data)); + case Role::radiogroup: + return adopt_nonnull_own_or_enomem(static_cast(new (nothrow) RadioGroup(data))); + case Role::region: + return adopt_nonnull_own_or_enomem(new (nothrow) Region(data)); + case Role::row: + return adopt_nonnull_own_or_enomem(static_cast(new (nothrow) Row(data))); + case Role::rowgroup: + return adopt_nonnull_own_or_enomem(new (nothrow) RowGroup(data)); + case Role::rowheader: + return adopt_nonnull_own_or_enomem(static_cast(new (nothrow) RowHeader(data))); + case Role::scrollbar: + return adopt_nonnull_own_or_enomem(static_cast(new (nothrow) Scrollbar(data))); + case Role::search: + return adopt_nonnull_own_or_enomem(new (nothrow) Search(data)); + case Role::searchbox: + return adopt_nonnull_own_or_enomem(new (nothrow) SearchBox(data)); + case Role::separator: + if (focusable) + return adopt_nonnull_own_or_enomem(new (nothrow) FocusableSeparator(data)); + else + return adopt_nonnull_own_or_enomem(new (nothrow) NonFocusableSeparator(data)); + case Role::slider: + return adopt_nonnull_own_or_enomem(static_cast(new (nothrow) Slider(data))); + case Role::spinbutton: + return adopt_nonnull_own_or_enomem(static_cast(new (nothrow) SpinButton(data))); + case Role::status: + return adopt_nonnull_own_or_enomem(new (nothrow) Status(data)); + case Role::strong: + return adopt_nonnull_own_or_enomem(new (nothrow) Strong(data)); + case Role::switch_: + return adopt_nonnull_own_or_enomem(new (nothrow) Switch(data)); + case Role::tab: + return adopt_nonnull_own_or_enomem(static_cast(new (nothrow) Tab(data))); + case Role::table: + return adopt_nonnull_own_or_enomem(new (nothrow) Table(data)); + case Role::tablist: + return adopt_nonnull_own_or_enomem(new (nothrow) TabList(data)); + case Role::tabpanel: + return adopt_nonnull_own_or_enomem(new (nothrow) TabPanel(data)); + case Role::term: + return adopt_nonnull_own_or_enomem(new (nothrow) Term(data)); + case Role::textbox: + return adopt_nonnull_own_or_enomem(new (nothrow) TextBox(data)); + case Role::time: + return adopt_nonnull_own_or_enomem(new (nothrow) Time(data)); + case Role::timer: + return adopt_nonnull_own_or_enomem(new (nothrow) Timer(data)); + case Role::toolbar: + return adopt_nonnull_own_or_enomem(new (nothrow) Toolbar(data)); + case Role::tooltip: + return adopt_nonnull_own_or_enomem(new (nothrow) Tooltip(data)); + case Role::tree: + return adopt_nonnull_own_or_enomem(static_cast(new (nothrow) Tree(data))); + case Role::treegrid: + return adopt_nonnull_own_or_enomem(static_cast(new (nothrow) TreeGrid(data))); + case Role::treeitem: + return adopt_nonnull_own_or_enomem(static_cast(new (nothrow) TreeItem(data))); + case Role::window: + return adopt_nonnull_own_or_enomem(new (nothrow) Window(data)); + default: + VERIFY_NOT_REACHED(); + } +} + +} diff --git a/Userland/Libraries/LibWeb/ARIA/RoleType.h b/Userland/Libraries/LibWeb/ARIA/RoleType.h new file mode 100644 index 0000000000..d8437aee46 --- /dev/null +++ b/Userland/Libraries/LibWeb/ARIA/RoleType.h @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2023, Jonah Shafran + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include +#include +#include +#include + +namespace Web::ARIA { + +enum class NameFromSource { + Author, + Content, + AuthorContent, + Prohibited +}; + +// https://www.w3.org/TR/wai-aria-1.2/#roletype +// The base role from which all other roles inherit. +class RoleType { +public: + static ErrorOr> build_role_object(Role, bool, AriaData const&); + + virtual ~RoleType() = default; + // https://www.w3.org/TR/wai-aria-1.2/#supportedState + virtual HashTable const& supported_states() const; + virtual HashTable const& supported_properties() const; + // https://www.w3.org/TR/wai-aria-1.2/#requiredState + virtual HashTable const& required_states() const; + virtual HashTable const& required_properties() const; + // https://www.w3.org/TR/wai-aria-1.2/#prohibitedattributes + virtual HashTable const& prohibited_properties() const; + virtual HashTable const& prohibited_states() const; + // https://www.w3.org/TR/wai-aria-1.2/#scope + virtual HashTable const& required_context_roles() const; + // https://www.w3.org/TR/wai-aria-1.2/#mustContain + virtual HashTable const& required_owned_elements() const; + // https://www.w3.org/TR/wai-aria-1.2/#namecalculation + virtual NameFromSource name_from_source() const = 0; + virtual bool accessible_name_required() const { return false; } + // https://www.w3.org/TR/wai-aria-1.2/#childrenArePresentational + virtual bool children_are_presentational() const { return false; } + // https://www.w3.org/TR/wai-aria-1.2/#implictValueForRole + using DefaultValueType = Variant; + virtual DefaultValueType default_value_for_property_or_state(StateAndProperties) const { return {}; }; + ErrorOr serialize_as_json(JsonObjectSerializer& object) const; + +protected: + RoleType(AriaData const&); + RoleType() { } + +private: + AriaData m_data; +}; + +} diff --git a/Userland/Libraries/LibWeb/CMakeLists.txt b/Userland/Libraries/LibWeb/CMakeLists.txt index 47057abfb5..a36687ab9b 100644 --- a/Userland/Libraries/LibWeb/CMakeLists.txt +++ b/Userland/Libraries/LibWeb/CMakeLists.txt @@ -5,6 +5,7 @@ set(SOURCES ARIA/ARIAMixin.cpp ARIA/ARIAMixin.idl ARIA/Roles.cpp + ARIA/RoleType.cpp ARIA/StateAndProperties.cpp Bindings/AudioConstructor.cpp Bindings/HostDefined.cpp @@ -593,9 +594,19 @@ set(SOURCES XML/XMLDocumentBuilder.cpp ) +invoke_generator( + "AriaRoles.cpp" + Lagom::GenerateAriaRoles + "${CMAKE_CURRENT_SOURCE_DIR}/ARIA/AriaRoles.json" + "ARIA/AriaRoles.h" + "ARIA/AriaRoles.cpp" + arguments -j "${CMAKE_CURRENT_SOURCE_DIR}/ARIA/AriaRoles.json" +) + generate_css_implementation() set(GENERATED_SOURCES + ARIA/AriaRoles.cpp CSS/DefaultStyleSheetSource.cpp CSS/Enums.cpp CSS/MediaFeatureID.cpp