Skip to content

Commit

Permalink
Add aria-allowed-attr.json
Browse files Browse the repository at this point in the history
younglim committed Dec 30, 2023
1 parent 7f040ea commit 75ed5b6
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
@@ -40,5 +40,6 @@
"div_aria-expanded_h4_strong_a_href": "The issue with this code snippet is that the `aria-expanded` attribute is not allowed for a `div` element. According to the ARIA specification, the `aria-expanded` attribute is only allowed for elements with the role of `button`, `checkbox`, `menuitem`, `radio`, and `treeitem`.\n\nThe correct version of the code snippet would be: <`div` role=\"button\"><`h4`><`strong`><`a` `href`=\"...\" aria-expanded=\"false\"></a></strong></h4></div>\n\nIn this version, we have added the `role` attribute to the `div` element and changed the placement of the `aria-expanded` attribute to the `a` element, which has the appropriate role for this attribute.",
"button_role=\"button\"": "The issue with the code snippet is that the `aria-required` attribute is not allowed for the `button` element's role. According to the WAI-ARIA specification, the `aria-required` attribute is only allowed for form elements such as `input`, `select`, and `textarea`. Therefore, this attribute should be removed from the `button` element.\n\nCorrect version of the code snippet: <`button` `role`=\"button\" `tabindex`=\"0\" `type`=\"button\"></button>",
"li_aria-selected": "The issue with the code snippet is that the `aria-selected` attribute is not allowed for the `<li>` element's role. The correct version of the code snippet would be:\n\n<li role=\"option\" aria-selected=\"true\">",
"div_role=\"document\"": "The issue with this code snippet is that the `aria-modal` attribute is not allowed for the `role` of `document`. The correct version of the code snippet would be: `<div role=\"dialog\" aria-modal=\"true\" tabindex=\"0\" style=\"\">`"
"div_role=\"document\"": "The issue with this code snippet is that the `aria-modal` attribute is not allowed for the `role` of `document`. The correct version of the code snippet would be: `<div role=\"dialog\" aria-modal=\"true\" tabindex=\"0\" style=\"\">`",
"a_aria-expanded_value-filter": "The issue with the code snippet is that the `aria-expanded` attribute is not allowed for the `a` element's role. \n\nThe correct version of the code snippet is: `<a role=\"button\" aria-expanded=\"true\" data-value-filter=\"all\"></a>`. \n\nIn the corrected version, the `role` attribute has been added to specify that the `a` element acts as a button, and the `aria-expanded` attribute is now allowed. Additionally, the `value-filter` attribute has been changed to `data-value-filter` to avoid any potential conflicts with HTML5."
}

0 comments on commit 75ed5b6

Please sign in to comment.