Skip to content

Commit

Permalink
Add aria-allowed-role.json landmark-unique.json
Browse files Browse the repository at this point in the history
  • Loading branch information
younglim committed Jan 18, 2024
1 parent 4c5bb10 commit ca94f97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion results/aria-allowed-role.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@
"a_role=\"application\"": "The issue with the code snippet is that the `role` attribute is set to \"application\" which is not appropriate for a link element. The correct role for a link element is \"link\" or \"button\" depending on the context. \n\nThe corrected code snippet would be: <`a` `href`=\"...\" `role`=\"link\"></a>",
"fieldset_role=\"search\"": "The issue with the code snippet is that the value of the `role` attribute is inappropriate for the `fieldset` element. The correct value for the `role` attribute for a `fieldset` element is \"group\" or \"presentation\". \n\nCorrected code snippet: <`fieldset` `role`=\"group\">",
"input_role=\"tab\"": "The issue with this code snippet is that the `role` attribute is set to \"tab\", which is inappropriate for an `input` element of `type` \"radio\". The correct value for the `role` attribute in this case should be \"radio\". The corrected code snippet is:\n\n<`input` `name`=\"...\" `role`=\"radio\" `type`=\"radio\">",
"button_role=\"menu\"": "The issue with the code snippet is that the `role` attribute is set to \"menu\" while the element is a button. The `role` attribute should reflect the purpose or function of the element, and in this case, it should be set to \"button\". The correct version of the code snippet is:\n\n<button aria-haspopup=\"menu\" role=\"button\" type=\"button\">"
"button_role=\"menu\"": "The issue with the code snippet is that the `role` attribute is set to \"menu\" while the element is a button. The `role` attribute should reflect the purpose or function of the element, and in this case, it should be set to \"button\". The correct version of the code snippet is:\n\n<button aria-haspopup=\"menu\" role=\"button\" type=\"button\">",
"a_role=\"listitem\"": "The issue with this code snippet is that the `role` attribute has an inappropriate value of \"listitem\" when it should be \"link\" for an `<a>` element. The correct version of the code snippet should be:\n\n<a href=\"...\" role=\"link\" tabindex=\"0\" type=\"tile\">"
}
3 changes: 2 additions & 1 deletion results/landmark-unique.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@
"aside_p": "The issue with this code snippet is that the `<aside>` element does not have a unique role or role/label/title, which can make it difficult for users with disabilities to navigate the page. \n\nThe correct version of the code snippet would be:\n\n<aside role=\"complementary\">\n <p></p>\n</aside>\n\nIn this version, the `<aside>` element has a unique role of \"complementary\" which helps to provide context and improve accessibility.",
"aside_p_strong": "The issue with the code snippet is that the `aside` element does not have a unique role or role/label/title, which can make it difficult for users with disabilities to navigate the page. \n\nThe corrected version of the code snippet could be:\n\n<aside role=\"complementary\" aria-label=\"Additional Information\">\n <p>\n <strong></strong>\n </p>\n</aside>\n\nIn this version, the `aside` element has a role of \"complementary\" and an `aria-label` attribute to provide a descriptive label for the element. This will improve accessibility for all users.",
"aside_role": "The issue with the code snippet is that the `aside` landmark does not have a unique label or title. This can make it difficult for users with disabilities who rely on screen readers to navigate the page. \n\nThe correct version of the code snippet is: `<aside role=\"complementary\" aria-label=\"Sidebar\">` or `<aside role=\"complementary\" aria-labelledby=\"sidebar-label\">` where `aria-label` or `aria-labelledby` provide a unique label or title for the `aside` landmark.",
"aside_time": "Issue: The `aside` element does not have a unique role or role/label/title, which can make it difficult for assistive technologies to understand its purpose.\n\nCorrected code snippet: <`aside` role=\"complementary\"><`time` aria-label=\"Date\"></time></aside>\n\nExplanation: The `role` attribute is added to the `aside` element with a value of \"complementary\", which indicates that it is a supporting section of the page. The `aria-label` attribute is added to the `time` element to provide a descriptive label for the date displayed."
"aside_time": "Issue: The `aside` element does not have a unique role or role/label/title, which can make it difficult for assistive technologies to understand its purpose.\n\nCorrected code snippet: <`aside` role=\"complementary\"><`time` aria-label=\"Date\"></time></aside>\n\nExplanation: The `role` attribute is added to the `aside` element with a value of \"complementary\", which indicates that it is a supporting section of the page. The `aria-label` attribute is added to the `time` element to provide a descriptive label for the date displayed.",
"aside_span_p_b_span_br_span": "The issue with this code snippet is that the `aside` element does not have a unique role or role/label/title, which can make it difficult for users with disabilities to navigate the page. \n\nThe correct version of the code snippet should include a unique role or role/label/title for the `aside` element. For example: \n\n<aside role=\"complementary\" aria-label=\"Related Content\">\n <span>\n <p>\n <b></b>\n <span></span>\n <br>\n <span></span>\n </p>\n </span>\n</aside>"
}

0 comments on commit ca94f97

Please sign in to comment.