Skip to content

Commit

Permalink
Add aria-allowed-attr.json
Browse files Browse the repository at this point in the history
  • Loading branch information
younglim committed Apr 15, 2024
1 parent 978c5fd commit 3ff5d12
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion results/aria-allowed-attr.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,6 @@
"span_role=\"\"": "The issue with the code snippet is that the `aria-level` attribute is not allowed for the `span` element's role. The correct version of the code snippet would be:\n\n<`span` `role`=\"heading\" `aria-level`=\"2\"> \n\nThis sets the `span` element's role to \"heading\" and allows the use of the `aria-level` attribute.",
"li_aria-controls_aria-selected": "The issue with the code snippet is that the `aria-controls` and `aria-selected` attributes are not allowed for the `li` element's role. These attributes are only allowed for elements with roles that support them. \n\nThe correct version of the code snippet would be:\n\n<li role=\"tab\" aria-controls=\"mmid-cpf-overview\" aria-selected=\"false\">",
"p_aria-level_style": "The issue with the code snippet is that the `aria-level` attribute is not allowed for the `p` element. The `aria-level` attribute is only allowed for `h1` to `h6` elements to indicate the heading level. \n\nThe correct version of the code snippet would be: \n\n<`h1` `aria-level`=\"1\" `style`=\"color: #000000; background-color: transparent; list-style-type: decimal; text-decoration: none;\">",
"a_aria-expanded_style": "The issue with the code snippet is that the `aria-expanded` attribute is not allowed for the `a` element's role. The correct version of the code snippet would be:\n\n<a role=\"button\" aria-expanded=\"true\" style=\"text-transform:none;\"></a>\n\nBy adding the `role=\"button\"` attribute, it allows the use of the `aria-expanded` attribute."
"a_aria-expanded_style": "The issue with the code snippet is that the `aria-expanded` attribute is not allowed for the `a` element's role. The correct version of the code snippet would be:\n\n<a role=\"button\" aria-expanded=\"true\" style=\"text-transform:none;\"></a>\n\nBy adding the `role=\"button\"` attribute, it allows the use of the `aria-expanded` attribute.",
"a_aria-controls_aria-selected_title": "The issue with the code snippet is that the `aria-selected` attribute is not allowed for the `a` element's role. The correct version of the code snippet would be:\n\n<a aria-controls=\"tab-search\" role=\"tab\" tabindex=\"0\" title=\"...\" aria-selected=\"false\"></a>\n\nBy adding the `role=\"tab\"` attribute, we specify the role of the element and allow the use of `aria-selected`. Additionally, we add `tabindex=\"0\"` to make the element focusable and allow keyboard navigation."
}

0 comments on commit 3ff5d12

Please sign in to comment.