From 9bb755875056ca23101b040a47f05040ab2970e7 Mon Sep 17 00:00:00 2001 From: catch <catch@35733.no-reply.drupal.org> Date: Tue, 2 May 2023 12:29:55 +0100 Subject: [PATCH] Issue #3117230 by martijn.cuppens, abhijeet.kumar2107, Gauravvvv, Kristen Pol, alexpott, andrewmacpherson, Chi, idebr: Remove redundant role="article" from <article> html tags --- core/modules/node/node.module | 2 -- core/modules/user/tests/src/Functional/UserPictureTest.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/core/modules/node/node.module b/core/modules/node/node.module index f84c5389940b..ad1c8e96f365 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -593,8 +593,6 @@ function template_preprocess_node(&$variables) { } } - // Add article ARIA role. - $variables['attributes']['role'] = 'article'; } /** diff --git a/core/modules/user/tests/src/Functional/UserPictureTest.php b/core/modules/user/tests/src/Functional/UserPictureTest.php index 4c0525331bfb..da7bc81beedf 100644 --- a/core/modules/user/tests/src/Functional/UserPictureTest.php +++ b/core/modules/user/tests/src/Functional/UserPictureTest.php @@ -128,7 +128,7 @@ public function testPictureOnNodeComment() { // Verify that the image is displayed on the node page. $this->drupalGet('node/' . $node->id()); - $elements = $this->cssSelect('article[role="article"] > footer img[alt="' . $alt_text . '"][src="' . $image_url . '"]'); + $elements = $this->cssSelect('article > footer img[alt="' . $alt_text . '"][src="' . $image_url . '"]'); $this->assertCount(1, $elements, 'User picture with alt text found on node page.'); // Enable user pictures on comments, instead of nodes. -- GitLab