Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292476

SystemBrandingBlock has identical anchor title and link content (image alt)

$
0
0

Problem/Motivation

The logo and site-name links in the the SystemBrandingBlock have a useless title attribute

This is the code in the block--system-branding-block.html.twig templates (approximately, some have classes etc).

  {% if site_logo %}
    <a href="{{ path('<front>') }}" title="{{ 'Home'|t }}" rel="home">
      <img src="{{ site_logo }}" alt="{{ 'Home'|t }}" />
    </a>
  {% endif %}

That duplication of title and link content (alt tag in this case) is recommended against.
Depending on screen reader configuration etc, it may cause duplication in playback, and in any case provides no additional value.

Proposed resolution

Remove the title attribute from links in the System Branding Block templates.

Include the Bartik, Classy and Stable themes in this update, as this is a low-risk change/no class changes. Include the change to the Umami theme/demo as no risk there and the demo should be as accessible as possible.

Remaining tasks

Check with a front-end framework manager about updating Stable and Classy themes.

Remove the title attribute from these templates.

  • core/modules/system/templates/block--system-branding-block.html.twig
  • core/profiles/demo_umami/themes/umami/templates/components/branding/block--system-branding-block.html.twig
  • core/themes/stable/templates/block/block--system-branding-block.html.twig
  • core/themes/classy/templates/block/block--system-branding-block.html.twig
  • core/themes/bartik/templates/block--system-branding-block.html.twig

User interface changes

Removes the title attribute from links in the System Branding Block templates.

API changes

None

Data model changes

None


Viewing all articles
Browse latest Browse all 292476

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>