summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/comment/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/comment/src')
-rw-r--r--core/modules/comment/src/Hook/CommentThemeHooks.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/core/modules/comment/src/Hook/CommentThemeHooks.php b/core/modules/comment/src/Hook/CommentThemeHooks.php
new file mode 100644
index 00000000000..e789af6dab1
--- /dev/null
+++ b/core/modules/comment/src/Hook/CommentThemeHooks.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Drupal\comment\Hook;
+
+use Drupal\Core\Hook\Attribute\Preprocess;
+
+/**
+ * Hook implementations for comment.
+ */
+class CommentThemeHooks {
+
+ /**
+ * Implements hook_preprocess_HOOK() for block templates.
+ */
+ #[Preprocess('block')]
+ public function preprocessBlock(&$variables): void {
+ if ($variables['configuration']['provider'] == 'comment') {
+ $variables['attributes']['role'] = 'navigation';
+ }
+ }
+
+}