Select element must have an accessible name
-
Hi,
I am getting this issue “Select element must have an accessible name” when testing page accessibility. Basically, a selector element requires a label. My design will not allow me to use a “<label>” element for the selector, so I have to add “aria-label” to the select element somehow.
Here is a reference for the issue: https://dequeuniversity.com/rules/axe/4.7/select-name
At the moment plugin generates following HTML:
<select name="alg_currency" id="alg_currency_select" class="alg_currency_select" onchange="this.form.submit()">
And I want it to generate something like this:
<select name="alg_currency" aria-label="alg_currency_select" id="alg_currency_select" class="alg_currency_select" onchange="this.form.submit()">
So, my question is — how can I achieve this without modifying plugin code?
- You must be logged in to reply to this topic.