- Issue created by @peter_serfozo
Widget used: `facets_form_date_range`
If the "Show title of facet" checkbox is disabled in the facet configuration form, the fieldset label ("") is not rendered:
return [
$facet->id() => [
'#type' => 'fieldset',
'#tree' => TRUE,
'#title' => $facet->get('show_title') ? $facet->getName() : NULL,
This causes an accessibility issue:
"Fieldset element does not have a name available to an accessibility API. Valid names are: legend element, aria-label undefined, aria-labelledby undefined."
1. Create a facet with `facets_form_date_range` and disable the "Show title of facet" option in the widget configuration form.
2. Navigate to the page where the facet is displayed and run an accessibility scan.
I can see two possible solutions:
1. Add an aria-label attribute to the fieldset.
2. Visually hide the fieldset label instead of setting it to an empty string.
Active
1.0
Code