Skip to content
Snippets Groups Projects
Verified Commit 57352211 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3182458 by alison, dmundra, lauriii, xjm, Gauravvvv, smustgrave,...

Issue #3182458 by alison, dmundra, lauriii, xjm, Gauravvvv, smustgrave, quietone, mgifford, bnjmnm, alexpott: Accessibility: skipped heading level on for search "no results" text

(cherry picked from commit 5c8213b5)
parent d9986292
No related branches found
No related tags found
21 merge requests!8376Drupal views: adding more granularity to the ‘use ajax’ functionality,!8300Issue #3443586 View area displays even when parent view has no results.,!7567Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7565Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7509Change label "Block description" to "Block type",!7344Issue #3292350 by O'Briat, KlemenDEV, hswong3i, smustgrave, quietone: Update...,!6922Issue #3412959 by quietone, smustgrave, longwave: Fix 12 'un' words,!6848Issue #3417553 by longwave: Remove withConsecutive() in CacheCollectorTest,!6720Revert "Issue #3358581 by pfrenssen, _tarik_, a.dmitriiev, smustgrave:...,!6560Update ClaroPreRender.php, confirming classes provided are in array format,!6528Issue #3414261 by catch: Add authenticated user umami performance tests,!6501Issue #3263668 by omkar-pd, Wim Leers, hooroomoo: Re-enable inline form errors...,!6354Draft: Issue #3380392 by phma: Updating language weight from the overview reverts label if translated,!6324Issue #3416723 by Ludo.R: Provide a "node type" views default argument,!6119Issue #3405704 by Spokje, longwave: symfony/psr-http-message-bridge major version bump,!5950Issue #3403653 by alexpott, longwave: Incorporate improvements to how contrib runs PHPStan to core,!5858Issue #3401971 by fjgarlin: Test-only job shouldn't require constant rebases...,!5716Draft: Issue #3401102 by Spokje, longwave, smustgrave: Nightwatch artifacts on GitLab not retained,!5674Transaction autocommit during shutdown relies on unreliable object destruction order,!5644Issue #3395563 by nireneko, marvil07, lauriii, borisson_, smustgrave, Wim...,!5041SDC ComponentElement: Transform slots scalar values to #plain_text instead of throwing an exception
Pipeline #32740 passed
Pipeline: drupal

#32750

    Pipeline: drupal

    #32749

      Pipeline: drupal

      #32748

        +1
        ...@@ -118,7 +118,9 @@ public function view(Request $request, SearchPageInterface $entity) { ...@@ -118,7 +118,9 @@ public function view(Request $request, SearchPageInterface $entity) {
        '#theme' => ['item_list__search_results__' . $plugin->getPluginId(), 'item_list__search_results'], '#theme' => ['item_list__search_results__' . $plugin->getPluginId(), 'item_list__search_results'],
        '#items' => $results, '#items' => $results,
        '#empty' => [ '#empty' => [
        '#markup' => '<h3>' . $this->t('Your search yielded no results.') . '</h3>', '#type' => 'html_tag',
        '#tag' => 'em',
        '#value' => $this->t('Your search yielded no results.'),
        ], ],
        '#list_type' => 'ol', '#list_type' => 'ol',
        '#context' => [ '#context' => [
        ......
        ...@@ -3,8 +3,14 @@ ...@@ -3,8 +3,14 @@
        * Stylesheet for results generated by the Search module. * Stylesheet for results generated by the Search module.
        */ */
        .search-form + .item-list > h3 { .search-form + .item-list > em {
        margin: 1.28rem; display: inline-block;
        font-family: "Scope One", Georgia, serif;
        font-size: 1.125rem;
        font-weight: 400;
        font-style: normal;
        line-height: 1.2;
        margin-block: 1.28rem;
        } }
        .search-form > .form-wrapper { .search-form > .form-wrapper {
        margin-bottom: 1.28rem; margin-bottom: 1.28rem;
        ......
        ...@@ -109,3 +109,21 @@ ...@@ -109,3 +109,21 @@
        margin-block-end: var(--sp3); margin-block-end: var(--sp3);
        } }
        } }
        .empty-search-results-text {
        color: var(--color-text-neutral-loud);
        font-family: var(--font-sans);
        font-size: 1.25rem;
        font-weight: bold;
        font-style: normal;
        line-height: var(--sp1-5);
        margin-block: var(--sp);
        }
        @media (min-width: 43.75rem) {
        .empty-search-results-text {
        margin-block: var(--sp2);
        font-size: 1.5rem;
        line-height: var(--sp2);
        }
        }
        ...@@ -95,3 +95,19 @@ ...@@ -95,3 +95,19 @@
        margin-block-end: var(--sp3); margin-block-end: var(--sp3);
        } }
        } }
        .empty-search-results-text {
        color: var(--color-text-neutral-loud);
        font-family: var(--font-sans);
        font-size: 20px;
        font-weight: bold;
        font-style: normal;
        line-height: var(--sp1-5);
        margin-block: var(--sp);
        @media (--md) {
        margin-block: var(--sp2);
        font-size: 24px;
        line-height: var(--sp2);
        }
        }
        ...@@ -579,6 +579,16 @@ function olivero_preprocess_search_result(&$variables) { ...@@ -579,6 +579,16 @@ function olivero_preprocess_search_result(&$variables) {
        } }
        } }
        /**
        * Implements hook_preprocess_item_list__search_results().
        */
        function olivero_preprocess_item_list__search_results(&$variables) {
        if (isset($variables['empty'])) {
        $variables['empty']['#attributes']['class'][] = 'empty-search-results-text';
        $variables['empty']['#attached']['library'][] = 'olivero/search-results';
        }
        }
        /** /**
        * Implements hook_preprocess_links__comment(). * Implements hook_preprocess_links__comment().
        */ */
        ......
        <?php
        /**
        * @file
        * Functions to support theming in the Stable9 theme.
        */
        /**
        * Implements hook_preprocess_item_list__search_results().
        *
        * Converts the markup of #empty for search results.
        */
        function stable9_preprocess_item_list__search_results(&$variables) {
        if (isset($variables['empty']['#tag'])) {
        $variables['empty']['#tag'] = 'h3';
        }
        }
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment