Invalid aria role for shared settings-block component title element
Found accessibility violation in https://gitlab.com/gitlab-org/gitlab/-/blob/bb898df95912d3190c6b4c4f120725ba9bc0f720/app/assets/javascripts/vue_shared/components/settings/settings_block.vue#L83-89 in feature specs during implementation of Reorganize Project-level Packages and Registrie... (#500217 - closed)
Found 1 accessibility violation:
1) aria-allowed-role: ARIA role should be appropriate for the element (minor)
https://dequeuniversity.com/rules/axe/4.9/aria-allowed-role?application=axeAPI
The following 2 nodes violate this rule:
Selector: section:nth-child(1) > .gl-gap-x-3.gl-justify-between.gl-items-start > .gl-grow > .gl-heading-2.\!gl-mb-2.gl-cursor-pointer
HTML: <h2 role="button" tabindex="-1" aria-expanded="false" aria-controls="package-registry-settings" data-testid="settings-block-title" class="gl-heading-2 !gl-mb-2 gl-cursor-pointer">Package registry</h2>
Fix any of the following:
- ARIA role button is not allowed for given element
Selector: section:nth-child(2) > .gl-gap-x-3.gl-justify-between.gl-items-start > .gl-grow > .gl-heading-2.\!gl-mb-2.gl-cursor-pointer
HTML: <h2 role="button" tabindex="-1" aria-expanded="false" aria-controls="container-registry-settings" data-testid="settings-block-title" class="gl-heading-2 !gl-mb-2 gl-cursor-pointer">Container registry</h2>
Fix any of the following:
- ARIA role button is not allowed for given element
Edited by Rahul Chanila