diff --git a/Libraries/LibWeb/HTML/HTMLElement.cpp b/Libraries/LibWeb/HTML/HTMLElement.cpp index cb3a9c62ea0..9428792102f 100644 --- a/Libraries/LibWeb/HTML/HTMLElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLElement.cpp @@ -740,6 +740,15 @@ Optional HTMLElement::default_role() const // https://www.w3.org/TR/html-aria/#el-code if (local_name() == TagNames::code) return ARIA::Role::code; + // https://w3c.github.io/html-aam/#el-dd + if (local_name() == TagNames::dd) + return ARIA::Role::definition; + // https://wpt.fyi/results/html-aam/dir-role.tentative.html + if (local_name() == TagNames::dir) + return ARIA::Role::list; + // https://w3c.github.io/html-aam/#el-dt + if (local_name() == TagNames::dt) + return ARIA::Role::term; // https://www.w3.org/TR/html-aria/#el-dfn if (local_name() == TagNames::dfn) return ARIA::Role::term; diff --git a/Tests/LibWeb/Text/expected/wpt-import/html-aam/dir-role.tentative.txt b/Tests/LibWeb/Text/expected/wpt-import/html-aam/dir-role.tentative.txt new file mode 100644 index 00000000000..4156b9fd290 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/html-aam/dir-role.tentative.txt @@ -0,0 +1,6 @@ +Harness status: OK + +Found 1 tests + +1 Pass +Pass el-dir \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/html-aam/dir-role.tentative.html b/Tests/LibWeb/Text/input/wpt-import/html-aam/dir-role.tentative.html new file mode 100644 index 00000000000..cc80c89969d --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/html-aam/dir-role.tentative.html @@ -0,0 +1,28 @@ + + + + HTML-AAM dir Element Role Verification Test + + + + + + + + + + +

Tentative test for the expected role mappings of the obsolete dir element. + The computedrole mappings are defined in HTML-AAM.

+ +

Merge the outcome of this test into roles.html in the appropriate alphabetical order, when it is no longer considered tentative:

+ +
  • x
  • x
  • + + + + + +