Select element must have an accessible name

[ad_1]

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?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer