Skip to content

Commit

Permalink
Added noscript on algolia search results page
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Apr 5, 2024
1 parent a37192d commit 59dd300
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions themes/stanford_basic/stanford_basic.theme
Original file line number Diff line number Diff line change
Expand Up @@ -525,9 +525,12 @@ function stanford_basic_preprocess_page__search(&$variables) {
$element = &$variables['page']['content'][$child_key];
if (isset($element['#plugin_id']) && $element['#plugin_id'] == 'system_main_block') {
$variables['page']['content'][$child_key] = [
'#type' => 'html_tag',
'#tag' => 'div',
'#value' => '',
'#type' => 'container',
'noscript' => [
'#type' => 'html_tag',
'#tag' => 'noscript',
'#value' => t('Enable Javascript to view search results.'),
],
'#attributes' => [
'id' => 'algolia-search',
'class' => ['centered-container'],
Expand Down

0 comments on commit 59dd300

Please sign in to comment.