Problem/Motivation

The favicon rel attribute value is "shortcut icon", which has been flagged by our web standards team as incorrect. According to the link below, the "shortcut" value must not be used anymore.

https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel#values

Steps to reproduce

Inspect the favicon.ico in the HEAD of the document.

Proposed resolution

Remove the value "shortcut".

Release notes snippet

Shortcut icons are now output as <link rel="icon"> as per the HTML spec instead of <link rel="shortcut icon">.

Comments

smulvih2 created an issue. See original summary.

smulvih2’s picture

Patch to remove "shortcut" from the favicon.

smulvih2’s picture

Status: Active » Needs review

Status: Needs review » Needs work
smulvih2’s picture

StatusFileSize
new1.27 KB

New patch that also changes the metatag test.

smulvih2’s picture

Status: Needs work » Needs review
smulvih2’s picture

StatusFileSize
new1.27 KB
vikashsoni’s picture

@smulvih2 patch working fine for me
thanks

gauravvvv’s picture

StatusFileSize
new1.27 KB

Fixed corrupted patch issue.

manish-31’s picture

StatusFileSize
new1.26 KB

Rerolled the above patch #9 as it failed to apply. Please review the attached patch.

idebr’s picture

Version: 9.0.x-dev » 9.3.x-dev
Status: Needs review » Needs work
+++ b/core/modules/system/tests/src/Functional/Page/DefaultMetatagsTest.php
@@ -30,7 +30,7 @@ public function testMetaTag() {
     // Ensure that the shortcut icon is on the page.
-    $result = $this->xpath('//link[@rel = "shortcut icon"]');
+    $result = $this->xpath('//link[@rel = "icon"]');
     $this->assertCount(1, $result, 'The shortcut icon is present.');

Patch works as expected, but the test still has commented lines that refer to 'shortcut icon' instead of 'icon'. Let's update these references as well.

ankithashetty’s picture

Status: Needs work » Needs review
StatusFileSize
new1.41 KB
new1.86 KB

Rerolled the patch in #10 and addressed the changes mentioned in #11, thanks!

smulvih2’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me, thanks!

larowlan’s picture

Adding issue credit for @idebr for #11

larowlan’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Bug Smash Initiative, +Needs change record, +9.3.0 release notes

Can we please get a change record for this, as we're updating HTML (albeit for an error).

On that basis I think this is 9.3.x only too. Even though the value output is not valid, there may be sites depending on the broken output. We don't like to change HTML in bugfix releases.

Can we also get a release notes snippet added to the issue summary, if release managers feel this is worth listing in release notes they can use that.

longwave’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs change record

Added a change notice: https://www.drupal.org/node/3220042

Added a release note snippet.

Patch looks OK to me so back to RTBC.

  • catch committed f8dbc98 on 9.3.x
    Issue #3195222 by smulvih2, ankithashetty, manish-31, larowlan, idebr,...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed f8dbc98 and pushed to 9.3.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.