Views with exposed filters should display result count
Context
Drupal view filters are useful for allowing users to search or limit results in views to find the content they are looking for quickly. The way the content is ordered, labeled, and result counts are displayed are important to make the experience clear, consistent, and user-friendly.
Decision
For views that have exposed filters, we will display results counters. In the view header, we will include the following information:
- A text area with a heading level 2 titled "search results" (may or may not be visually-hidden depending on the other headings and the context of the page)
- A counter field indicating how many results are in the view.
Additionally, some care should be taken as to what text appears on the submit button text. By default, the label for this button is "Apply" but this is often confusing within the context of the University, as "Apply" is the language used for opening an application for admission. More appropriate labels may be:
- Apply
Search results heading
<h2 class="visually-hidden">Search Results</h2>
Results summary
<div class="result-summary"><p>@total results</p></div>
Submit Button Label
Under advanced, open the Settings link next to Exposed form style:
Edit the Submit button text
Final View Display with Exposed Filters
Page/block display and advanced settings
Status
Consequences
Drupal view filter and search functionality will be easy to navigate and use.
Using live regions to announce change in real time still doesn't work well with views (possibly AJAX or a browser/AT issue). For now, having the heading above regular counter text should suffice, but ideally the change in text would be announced in real time.