function claro_form_views_exposed_form_alter
Same name in other branches
- 9 core/themes/claro/claro.theme \claro_form_views_exposed_form_alter()
- 8.9.x core/themes/claro/claro.theme \claro_form_views_exposed_form_alter()
- 10 core/themes/claro/claro.theme \claro_form_views_exposed_form_alter()
Implements hook_form_FORM_ID_alter() for views_exposed_form.
File
-
core/
themes/ claro/ claro.theme, line 901
Code
function claro_form_views_exposed_form_alter(&$form, FormStateInterface $form_state) {
$view = $form_state->getStorage()['view'];
$view_title = $view->getTitle();
// Add a label so screen readers can identify the purpose of the exposed form
// without having to scan content that appears further down the page.
$form['#attributes']['aria-label'] = t('Filter the contents of the %view_title view', [
'%view_title' => $view_title,
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.