diff --git a/composer.json b/composer.json index 9cd61f8ecc..a2336e67bc 100644 --- a/composer.json +++ b/composer.json @@ -392,7 +392,7 @@ "2942404 - Contentinfo landmark" : "https://www.drupal.org/files/issues/2023-06-30/2942404-messages-should-have-role-status.patch", "3047110 - Add workflow to taxonomy" : "https://www.drupal.org/files/issues/2023-04-14/3047110-45.patch", "3106205 - Length of menu_tree.url and menu_tree.route_param_key are too short (255 characters)": "https://www.drupal.org/files/issues/2024-01-02/3106205-length-menu-tree-too-short-48.patch", - "3333401 - Pager h4 cause accessibility flag on many pages": "https://www.drupal.org/files/issues/2023-11-01/3333401-64.patch", + "3333401 - Pager h4 cause accessibility flag on many pages": "patches/3333401-configurable-pager-heading-default-h2.patch", "3382759 - Add multiple workflow content moderation filter to Views.": "https://www.drupal.org/files/issues/2023-08-24/3382759-8.patch", "3241295 - CKEditor 5 isn't respecting field widgets row settings": "https://www.drupal.org/files/issues/2023-11-14/3241295-d10.1.6-114.patch", "3376267 - [upstream] Add style to anchor leads to unusable behavior": "https://www.drupal.org/files/issues/2023-08-09/fix_anchor_scheme_to_not_copy_on_enter-3376167-11.patch" diff --git a/composer.lock b/composer.lock index 0839fda16b..5b16da67f6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1bd88357c60cc37eb2c92720b5436545", + "content-hash": "52a8fc943fb3e90574fb0f0ec2e4a5b0", "packages": [ { "name": "asm89/stack-cors", @@ -1808,16 +1808,16 @@ }, { "name": "doctrine/deprecations", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931" + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931", - "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", "shasum": "" }, "require": { @@ -1849,9 +1849,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.2" + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" }, - "time": "2023-09-27T20:04:15+00:00" + "time": "2024-01-30T19:34:25+00:00" }, { "name": "doctrine/event-manager", @@ -6519,17 +6519,17 @@ }, { "name": "drupal/geocoder", - "version": "4.20.0", + "version": "4.21.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/geocoder.git", - "reference": "8.x-4.20" + "reference": "8.x-4.21" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/geocoder-8.x-4.20.zip", - "reference": "8.x-4.20", - "shasum": "1bf5ff7082e64f55128032b61c7333fd611c5347" + "url": "https://ftp.drupal.org/files/projects/geocoder-8.x-4.21.zip", + "reference": "8.x-4.21", + "shasum": "f7c7a6dbfa1d9b3fb9768d4956e6a931db85317b" }, "require": { "davedevelopment/stiphle": "^0.9.2", @@ -6540,9 +6540,9 @@ "willdurand/geocoder": "^4.0" }, "require-dev": { - "drupal/address": "*", + "drupal/address": "^1.11 || ^2.0", "drupal/geocoder_field": "*", - "drupal/geofield": "*", + "drupal/geofield": "^1.52", "geo6/geocoder-php-addok-provider": "^1.0", "geo6/geocoder-php-bpost-provider": "^1.3.0", "geo6/geocoder-php-geopunt-provider": "^1.0", @@ -6552,13 +6552,12 @@ "geocoder-php/bing-maps-provider": "^4.0", "geocoder-php/free-geoip-provider": "^4.1", "geocoder-php/geo-plugin-provider": "^4.0", - "geocoder-php/geoips-provider": "^4.1", "geocoder-php/geonames-provider": "^4.1", "geocoder-php/google-maps-provider": "^4.2", - "geocoder-php/graphhopper-provider": "^0.1.0", + "geocoder-php/graphhopper-provider": "^0.5.0", "geocoder-php/host-ip-provider": "^4.0", "geocoder-php/ip-info-db-provider": "^4.0", - "geocoder-php/mapbox-provider": "^0.1", + "geocoder-php/mapbox-provider": "^1.0", "geocoder-php/mapquest-provider": "^4.0", "geocoder-php/maptiler-provider": "^1.0", "geocoder-php/maxmind-provider": "^4.1", @@ -6566,7 +6565,7 @@ "geocoder-php/open-cage-provider": "^4.0", "geocoder-php/openrouteservice-provider": "^1.0", "geocoder-php/pelias-provider": "^1.1", - "geocoder-php/photon-provider": "^0.1.0", + "geocoder-php/photon-provider": "^0.6", "geocoder-php/tomtom-provider": "^4.0", "geocoder-php/yandex-provider": "^4.0", "systonic/ban-france-provider": "^1.0" @@ -6574,8 +6573,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-4.20", - "datestamp": "1706097387", + "version": "8.x-4.21", + "datestamp": "1706483330", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -7525,6 +7524,10 @@ "name": "dawehner", "homepage": "https://www.drupal.org/user/99340" }, + { + "name": "dww", + "homepage": "https://www.drupal.org/user/46549" + }, { "name": "geek-merlin", "homepage": "https://www.drupal.org/user/229048" @@ -9332,6 +9335,10 @@ "name": "amitaibu", "homepage": "https://www.drupal.org/user/57511" }, + { + "name": "bluegeek9", + "homepage": "https://www.drupal.org/user/1286304" + }, { "name": "jhedstrom", "homepage": "https://www.drupal.org/user/208732" diff --git a/config/sync/feature_toggle.features.yml b/config/sync/feature_toggle.features.yml index c874cc6e94..21518034dc 100644 --- a/config/sync/feature_toggle.features.yml +++ b/config/sync/feature_toggle.features.yml @@ -4,4 +4,3 @@ features: feature_all_hub_side_navs: FEATURE_ALL_HUB_SIDE_NAVS feature_health_connect_number: FEATURE_HEALTH_CONNECT_NUMBER feature_next_story_preview: FEATURE_NEXT_STORY_PREVIEW - feature_mobile_app_promo: FEATURE_MOBILE_APP_PROMO diff --git a/config/sync/views.view.content.yml b/config/sync/views.view.content.yml index defd826236..1670a828fb 100644 --- a/config/sync/views.view.content.yml +++ b/config/sync/views.view.content.yml @@ -523,7 +523,7 @@ display: offset: false offset_label: Offset quantity: 9 - pagination_heading_level: h4 + pagination_heading_level: '' exposed_form: type: basic options: diff --git a/config/sync/views.view.orphaned_paragraphs.yml b/config/sync/views.view.orphaned_paragraphs.yml index 30ab7af957..b04603861d 100644 --- a/config/sync/views.view.orphaned_paragraphs.yml +++ b/config/sync/views.view.orphaned_paragraphs.yml @@ -508,7 +508,7 @@ display: offset: false offset_label: Offset quantity: 9 - pagination_heading_level: h4 + pagination_heading_level: '' exposed_form: type: basic options: diff --git a/patches/3333401-configurable-pager-heading-default-h2.patch b/patches/3333401-configurable-pager-heading-default-h2.patch new file mode 100644 index 0000000000..6d59bc7f77 --- /dev/null +++ b/patches/3333401-configurable-pager-heading-default-h2.patch @@ -0,0 +1,245 @@ +diff --git a/core/modules/views/src/Plugin/views/pager/SqlBase.php b/core/modules/views/src/Plugin/views/pager/SqlBase.php +index 11cbaf44901be7c0e09ba1206fa5def80a92956a..135d32644c038a9bff7f494b89e9685aed9c592f 100644 +--- a/core/modules/views/src/Plugin/views/pager/SqlBase.php ++++ b/core/modules/views/src/Plugin/views/pager/SqlBase.php +@@ -68,6 +68,7 @@ abstract class SqlBase extends PagerPluginBase implements CacheableDependencyInt + $options['offset'] = ['default' => 0]; + $options['id'] = ['default' => 0]; + $options['total_pages'] = ['default' => '']; ++ $options['pagination_heading_level'] = ['default' => 'h2']; + $options['expose'] = [ + 'contains' => [ + 'items_per_page' => ['default' => FALSE], +diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +index 11cbaf44901be7c0e09ba1206fa5def80a92956a..135d32644c038a9bff7f494b89e9685aed9c592f 100644 +--- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php ++++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +@@ -780,6 +780,38 @@ public function isDefaulted($option) { + return !$this->isDefaultDisplay() && !empty($this->default_display) && !empty($this->options['defaults'][$option]); + } + ++ /** ++ * Extracts heading elements from views configuration (@field_rewrite_elements). ++ */ ++ public function getHeadings() { ++ static $headings = NULL; ++ if (!isset($headings)) { ++ $elements = \Drupal::config('views.settings')->get('field_rewrite_elements'); ++ foreach ($elements as $key => $element) { ++ if (strlen($key) == 2 && $element[0] == 'H') { ++ $headings[$key] = $element; ++ } ++ } ++ } ++ return $headings; ++ } ++ ++ /** ++ * {@inheritdoc} ++ */ ++ public function getElements() { ++ static $elements = NULL; ++ if (!isset($elements)) { ++ // @todo Add possible html5 elements. ++ $elements = [ ++ '' => $this->t('- Use default -'), ++ ]; ++ $elements += $this->getHeadings(); ++ } ++ ++ return $elements; ++ } ++ + /** + * {@inheritdoc} + */ +@@ -1871,6 +1887,14 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { + $form['pager_options'] = [ + '#tree' => TRUE, + ]; ++ $form['pager_options']['pagination_heading_level'] = [ ++ '#title' => $this->t('Heading Level'), ++ '#options' => $this->getElements(), ++ '#type' => 'select', ++ '#default_value' => $plugin->getHeadingLevel(), ++ '#description' => $this->t('Choose a heading level equal to or one lower than the preceding header.'), ++ '#fieldset' => 'style_settings', ++ ]; + $plugin->buildOptionsForm($form['pager_options'], $form_state); + } + break; +diff --git a/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php b/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php +index d02f67034417598829cf41ee2f144092df29bac4..1675f09ab978cb23f296d98c0ba02521fe5c6157 100644 +--- a/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php ++++ b/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php +@@ -72,6 +72,20 @@ public function setOffset($offset) { + $this->options['offset'] = $offset; + } + ++ /** ++ * Get the pager heading tag. ++ */ ++ public function getHeadingLevel() { ++ return $this->options['pagination_heading_level'] ?? 'h2'; ++ } ++ ++ /** ++ * Set the pager heading. ++ */ ++ public function setHeadingLevel($headingLevel) { ++ $this->options['pagination_heading_level'] = $headingLevel; ++ } ++ + /** + * Get the current page. + * +diff --git a/core/modules/views/src/Plugin/views/pager/Full.php b/core/modules/views/src/Plugin/views/pager/Full.php +index d02f67034417598829cf41ee2f144092df29bac4..1675f09ab978cb23f296d98c0ba02521fe5c6157 100644 +--- a/core/modules/views/src/Plugin/views/pager/Full.php ++++ b/core/modules/views/src/Plugin/views/pager/Full.php +@@ -86,10 +86,14 @@ public function render($input) { + 3 => $this->options['tags']['next'], + 4 => $this->options['tags']['last'], + ]; ++ $heading_options = [ ++ 'pagination_heading_level' => parent::getHeadingLevel(), ++ ]; + return [ + '#theme' => $this->themeFunctions(), + '#tags' => $tags, + '#element' => $this->options['id'], ++ '#options' => $heading_options, + '#parameters' => $input, + '#quantity' => $this->options['quantity'], + '#route_name' => !empty($this->view->live_preview) ? '' : '', +diff --git a/core/modules/views/src/Plugin/views/pager/Mini.php b/core/modules/views/src/Plugin/views/pager/Mini.php +index d02f67034417598829cf41ee2f144092df29bac4..1675f09ab978cb23f296d98c0ba02521fe5c6157 100644 +--- a/core/modules/views/src/Plugin/views/pager/Mini.php ++++ b/core/modules/views/src/Plugin/views/pager/Mini.php +@@ -93,10 +93,14 @@ public function render($input) { + 1 => $this->options['tags']['previous'], + 3 => $this->options['tags']['next'], + ]; ++ $heading_options = [ ++ 'pagination_heading_level' => parent::getHeadingLevel(), ++ ]; + return [ + '#theme' => $this->themeFunctions(), + '#tags' => $tags, + '#element' => $this->options['id'], ++ '#options' => $heading_options, + '#parameters' => $input, + '#route_name' => !empty($this->view->live_preview) ? '' : '', + ]; +diff --git a/core/themes/claro/templates/pager.html.twig b/core/themes/claro/templates/pager.html.twig +index d02f67034417598829cf41ee2f144092df29bac4..1675f09ab978cb23f296d98c0ba02521fe5c6157 100644 +--- a/core/themes/claro/templates/pager.html.twig ++++ b/core/themes/claro/templates/pager.html.twig +@@ -36,7 +36,8 @@ + #} + {% if items %} +