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.

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

Computed names before and after the merge request
ControlBeforeAfter
Numeric valueno nameValue
Content typesno nameContent types
Tagsno nameSelect terms from vocabulary Tags
OperatorOperatorOperator (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

  1. Open Before. Tab through the form. The value field, Content type and Tags are announced with no name; the inspector shows an empty name.
  2. Open After and tab again. The same controls are announced as “Value”, “Content types” and “Select terms from vocabulary Tags”.
  3. 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.
  4. 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

Source and evidence