Saltar navegación

[Escalado a 2º nivel] Add ID to form controls for accessibility

This support ticket is created 2 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Zona horaria del colaborador: Europe/London (GMT+01:00)

Este tema contiene 3 respuestas, tiene 2 mensajes.

Última actualización por matthewC-9 2 years, 1 month ago.

Asistido por: Nigel.

Autor
Mensajes
#2691645

Hi there - when I run enlace oculto through the WAVE accessibility checker (enlace oculto), it says the search filters are missing labels. The input and selects do have names that match the "for" on the labels, but they ideally need to match an ID specifically (enlace oculto).

I'm adding the filters to the view like this:

<div class="form-group">
	<label for="wpv_post_search">[wpml-string context="wpv-views"]Keyword[/wpml-string]</label>
	[wpv-filter-search-box output="bootstrap"]
</div>
  <div class="form-group">
	<label for="wpv-resource-category">[wpml-string context="wpv-views"]Categories[/wpml-string]</label>
	[wpv-control-post-taxonomy taxonomy="resource-category" type="select" default_label="All categories" url_param="wpv-resource-category"]
</div>
<div class="form-group">
	<label for="wpv-resource-audience">[wpml-string context="wpv-views"]Audiences[/wpml-string]</label>
	[wpv-control-post-taxonomy taxonomy="resource-audience" type="select" default_label="All audiences" url_param="wpv-resource-audience"]
</div>
  <div class="form-group">
	<label for="wpv-access-type">[wpml-string context="wpv-views"]Access types[/wpml-string]</label>
	[wpv-control-post-taxonomy taxonomy="access-type" type="select" default_label="All access types" url_param="wpv-access-type"]
</div>

Is there a different way I could be doing this so the fields get added with IDs, and/or could adding the ID become an automatic part of the shortcode output?

thanks!
Sarah

#2691741

Nigel
Colaborador

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+01:00)

Hi Sarah

We already have some requests about modifying the markup of the generated form inputs in this way.

I'm adding this thread to the internal ticket about this to try and raise the priority.

When I have some time later I'll take a look at the source code myself to see if I can help expedite a solution for this issue.

#2692821

Nigel
Colaborador

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+01:00)

Just a note that I wasn't able to identify a way to make any changes to the form controls output without directly edited the plugin itself. But, having discussed with the developers, they have added it to the board for the current development sprint, so it will hopefully receive some attention before too long.

#2692847

Thank you, Nigel - much appreciated!

-Sarah