When a Views exposed filter also exposes its operator, the value control loses its name. The content type and taxonomy filters have the same problem. The fix keeps the labels for assistive technology and hides them visually, so the form looks the same.
-
Before
The value field, the Content type select and the Tags select have no accessible name. The Operator select is named.
-
After
The same form with the labels “Value”, “Content types” and “Select terms from vocabulary Tags”, visually hidden. A checkbox reveals them.
What changes in the HTML
Before, the value element has no label; the fieldset legend groups it but does not name it:
<fieldset>
<legend>ID (exposed operator)</legend>
<label for="op">Operator</label>
<select id="op">…</select>
<input type="text" id="value" name="nid_open[value]">
</fieldset>
After, with the added label highlighted:
<fieldset>
<legend>ID (exposed operator)</legend>
<label for="op">Operator</label>
<select id="op">…</select>
<label class="visually-hidden" for="value">Value</label>
<input type="text" id="value" name="nid_open[value]">
</fieldset>
The content type and Tags selects get the same treatment, with the labels “Content types” and “Select terms from vocabulary Tags”. The label is present for the accessible name; #title_display => invisible hides it visually in Drupal.
Accessible names
| Control | Before | After |
|---|---|---|
| Numeric value | no name | Value |
| Content types | no name | Content types |
| Tags | no name | Select terms from vocabulary Tags |
| Operator | Operator | Operator (unchanged) |
Before, axe reports label for the value field and select-name for the two selects. After, it reports none. The fieldset legends and the operator names are unchanged.
What to check
- Open Before. Tab through the form. The value field, Content type and Tags are announced with no name; the inspector shows an empty name.
- Open After and tab again. The same controls are announced as “Value”, “Content types” and “Select terms from vocabulary Tags”.
- Tick “Show the labels that are visually hidden” on the After page. The labels become visible with a dashed outline; the layout otherwise stays the same, and the accessible names do not change.
- The visible form is identical between Before and After when the labels are hidden. The change is in the accessibility tree, not the layout.
What this demonstration is not
- It is simplified Views markup, not a real View or a Drupal installation. The operator, legends and values are representative.
- It does not cover the date, string, boolean, multiple-value or grouped filters that the lab matrix lists as untested.
- No person has done the keyboard and screen-reader pass; the lab evidence is synthetic. See the report.