- 🇺🇸United States matthew_hilbert
quietone → credited matthew_hilbert → .
- 🇳🇿New Zealand quietone
Closed 📌 Too many exposed filters and operators create weird view Closed: duplicate as a duplicate, adding credit
When exposing a views filter on a numeric or date field the labels shown are missing or not placed in a logical order. Also there is no containing span to group operator and input field(s). This is related to / extends #2480719: Missing label and description for exposed numeric filter when using 'between' filter →
The label and description are not rendered correctly. There is no span surrounding the two elements for styling / keeping them together. The operator filter element label "Operator" is rendered in the same style as a separate filter.
The label and description are rendered on the first of the two inputs. There is no span surrounding the three elements for styling / keeping them together. The operator filter element label "Operator" and the "And" label are rendered in the same style as a separate filter. This is the behaviour after applying the patch for #2480719: Missing label and description for exposed numeric filter when using 'between' filter → . The Language filter is shown for reference how the exposed filter looks when showing a row of filters.
Do what was done in D7 Views.
Single
Single operator exposed
Multiple
Multiple operator exposed
If an exposed filter requires multiple form elements, add a wrapper around the whole thing and use the field label as the legend for that wrapping fieldset. This allows the label for the field itself to be visible, ensures all the elements related to the same field are grouped together (both visually and in the form structure), and allows the sub elements to all have visible labels.
Cases where an exposed filter require multiple elements include:
None.
Views exposed filters that involve multiple form elements are now wrapped in a fieldset. For example, this applies to numeric filters with a 'Between' operator, or any filter with an exposed operator. The filter label is now always visible, as the fieldset legend, and any included elements are nested inside.
This significantly improves the user interface for both sighted users and people using assistive technology. However, this means that the form structure of the exposed filter form is changed. Sites that implement hook_form_alter() to modify the exposed filter form may have to update that implementation to handle the changed form structure. See the change record → for details.
Fixed
9.1
Last updated
Related to the Views in Drupal Core initiative.
Makes Drupal easier to use. Preferred over UX, D7UX, etc.
It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
quietone → credited matthew_hilbert → .
Closed 📌 Too many exposed filters and operators create weird view Closed: duplicate as a duplicate, adding credit