From 22e9c870d325218b76292b4c1eda20cb35a093e5 Mon Sep 17 00:00:00 2001 From: younglim Date: Thu, 23 Nov 2023 03:07:14 +0000 Subject: [PATCH] Add svg-img-alt.json aria-required-attr.json aria-allowed-role.json aria-allowed-attr.json scrollable-region-focusable.json aria-required-children.json select-name.json aria-required-parent.json aria-roles.json landmark-unique.json autocomplete-valid.json presentation-role-conflict.json --- results/aria-allowed-attr.json | 7 ++++++- results/aria-allowed-role.json | 5 ++++- results/aria-required-attr.json | 3 ++- results/aria-required-children.json | 4 +++- results/aria-required-parent.json | 3 ++- results/aria-roles.json | 4 +++- results/autocomplete-valid.json | 3 ++- results/landmark-unique.json | 4 +++- results/presentation-role-conflict.json | 3 ++- results/scrollable-region-focusable.json | 5 ++++- results/select-name.json | 3 ++- results/svg-img-alt.json | 4 ++++ 12 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 results/svg-img-alt.json diff --git a/results/aria-allowed-attr.json b/results/aria-allowed-attr.json index 90cc033..a5f0321 100644 --- a/results/aria-allowed-attr.json +++ b/results/aria-allowed-attr.json @@ -27,5 +27,10 @@ "a_aria-controls_aria-expanded": "The issue with the code snippet is that the `aria-controls` and `aria-expanded` attributes are not allowed for the `a` element's role. These attributes are only allowed for elements with roles that support them, such as `button` or `combobox`. \n\nThe correct version of the code snippet would be:\n\nLink Text\n\nIn this version, the `a` element's role has been changed to `button` to support the use of the `aria-controls` and `aria-expanded` attributes. Additionally, a `href` attribute has been added to ensure the link is still functional for users who do not rely on assistive technology.", "section_aria-expanded": "The issue with the code snippet is that the `aria-expanded` attribute is not allowed for the `section` element's role. The correct version of the code snippet should be:\n\n<`section` `role`=\"region\" `aria-expanded`=\"false\">", "a_role=\"button\"": "The issue with this code snippet is that the `aria-selected` attribute is not allowed for an `a` element with `role=\"button\"`. The `aria-selected` attribute is only allowed for elements with `role=\"option\"`, `role=\"checkbox\"`, `role=\"radio\"`, or `role=\"tab\"`. \n\nThe correct version of the code snippet would be: \n\n", - "section_aria-expanded_style": "The issue with the code snippet is that the `aria-expanded` attribute is not allowed for the `section` element. According to the WAI-ARIA specification, the `aria-expanded` attribute is only allowed for elements with a role of `button`, `checkbox`, `menuitem`, `menuitemcheckbox`, `menuitemradio`, or `treeitem`. \n\nThe correct version of the code snippet would be:\n\n<`section` `role`=\"region\" `aria-label`=\"Section Title\" `style`=\"top: 0px; position: sticky;\"> \n\nNote: The `role` attribute has been added to specify the role of the `section` element as a region, and the `aria-label` attribute has been added to provide a descriptive label for the region." + "section_aria-expanded_style": "The issue with the code snippet is that the `aria-expanded` attribute is not allowed for the `section` element. According to the WAI-ARIA specification, the `aria-expanded` attribute is only allowed for elements with a role of `button`, `checkbox`, `menuitem`, `menuitemcheckbox`, `menuitemradio`, or `treeitem`. \n\nThe correct version of the code snippet would be:\n\n<`section` `role`=\"region\" `aria-label`=\"Section Title\" `style`=\"top: 0px; position: sticky;\"> \n\nNote: The `role` attribute has been added to specify the role of the `section` element as a region, and the `aria-label` attribute has been added to provide a descriptive label for the region.", + "p_aria-level": "The issue with the code snippet is that `aria-level` attribute is not allowed for the `p` element's role. \n\nThe correct version of the code snippet would be: `

Heading level 1

` or `

Heading level 1

` depending on the context and content of the element.", + "span_aria-required": "The issue with the code snippet is that the `aria-required` attribute is not allowed for a `span` element. The `aria-required` attribute is only allowed for form elements such as `input`, `select`, and `textarea`.\n\nThe correct version of the code snippet would be to use a form element that supports the `aria-required` attribute, or to use a different ARIA attribute that is appropriate for the `span` element's role. For example, if the `span` element is being used as a label for an input field, the `aria-labelledby` attribute could be used instead.", + "td_role=\"button\"": "The issue with the code snippet is that `aria-selected` attribute is not allowed for the `button` role. The correct version of the code snippet is:\n\n
\n\nNote that `aria-selected` attribute has been removed.", + "li_role=\"presentation\"": "The issue with the code snippet is that the `aria-controls`, `aria-hidden`, and `aria-selected` attributes are not allowed for the `role=\"presentation\"` element. These attributes are only allowed for certain roles such as `tab`, `treeitem`, and `tabpanel`. \n\nThe correct version of the code snippet would be:\n\n
  • \n\nIn this version, the `aria-controls`, `aria-hidden`, and `aria-selected` attributes have been removed and the `role` attribute has been updated to `none presentation`, which allows the element to be treated as a presentation role but without the additional ARIA attributes.", + "div_aria-checked": "The issue with this code snippet is that the `aria-checked` attribute is not allowed for the `div` element's role. The `aria-checked` attribute is typically used for checkboxes and radio buttons. \n\nThe correct version of the code snippet would be to either change the `div` element's role to a checkbox or radio button, or to remove the `aria-checked` attribute altogether if it is not necessary for the element's functionality." } diff --git a/results/aria-allowed-role.json b/results/aria-allowed-role.json index 5ea01d1..50936d1 100644 --- a/results/aria-allowed-role.json +++ b/results/aria-allowed-role.json @@ -39,5 +39,8 @@ "label_role=\"button\"": "The issue with the code snippet is that the `role` attribute is set to \"button\", which is inappropriate for a `label` element. The correct value for the `role` attribute in this case should be \"label\". \n\nCorrected code snippet: <`label` `aria-label`=\"...\" `for`=\"top-nav-input-checkbox\" `role`=\"label\" `tabindex`=\"0\">", "li_role=\"article\"": "The issue with the code snippet is that the role attribute is set to \"article\" which is inappropriate for an `li` element. The correct version of the code snippet should have the role attribute set to \"listitem\" which is appropriate for `li` elements. The corrected code snippet is: <`li` `lang`=\"en\" `role`=\"listitem\">", "li_role=\"navigation\"": "The issue with the code snippet is that the value of the `role` attribute should be \"menu\" instead of \"navigation\" for a list element (`li`) that represents a menu. The correct version of the code snippet should be: <`li` `role`=\"menu\">", - "button_role=\"tooltip\"": "The issue with the code snippet is that the value of the `role` attribute is inappropriate. The `role` attribute is used to define the semantic meaning of an element for assistive technologies and should only be used with appropriate values. In this case, the value \"tooltip\" is not a valid value for the `role` attribute of a button element.\n\nThe correct version of the code snippet should be: `