Role not allowed for select drop-down
CKAN version https://demo.ckan.org/dataset/fishing/resource/new
Describe the bug This is similar to https://github.com/ckan/ckan/issues/7184
Title: ,WCAG 1.3.1,WCAG 4.1.2,Best Practice: Ensures role attribute has an appropriate value for the element (#s2id_autogen1) Tags: Accessibility, , WCAG 1.3.1, WCAG 4.1.2, Best Practice, aria-allowed-role
Issue: Ensures role attribute has an appropriate value for the element (aria-allowed-role - https://dequeuniversity.com/rules/axe/4.4/aria-allowed-role?application=msftAI)
Target application: Add data to the dataset - CKAN Demo - https://demo.ckan.org/en/dataset/fishing/resource/new
Element path: #s2id_autogen1
Snippet:
How to fix: Fix any of the following: ARIA role button is not allowed for given element
Environment: Microsoft Edge version 107.0.1418.35
====
This accessibility issue was found using Accessibility Insights for Web 2.35.0 (axe-core 4.4.1), a tool that helps find and fix accessibility issues. Get more information & download this tool at http://aka.ms/AccessibilityInsights.
Worth noting that Select2 has a number of known accessibility problems that probably should be pushed upstream.
https://github.com/select2/select2/issues?q=is%3Aissue+is%3Aopen+accessibility
This alternate pattern might work https://designsystem.digital.gov/components/combo-box/
Same finding as #7184, and it looks fixed on master for the same reason. Details and the axe output are in my comment there.
Short version: the #s2id_autogen1 element in this report is Select2 3.x's input.select2-focusser, which carried role="button". Master vendors Select2 4.1.0-rc.0, where the focusser no longer exists. Checked against the vendored bundle in a real browser: no select2-focusser in the DOM, and aria-allowed-role reports 0 violations with 9 passes.
Suggest closing this alongside #7184.