Logo does not get alt text if branding block does not display site_name
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3582196. --> Reported by: [oakulm](https://www.drupal.org/user/880500) Related to !29 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Currently if you do not want to display site name next to logo in branding block logo image alt text is always empty.</p> <pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {% if site_logo %}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class="branding"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;img class="h-full w-full" src="{{ site_logo_url }}" alt="{{ site_name }}" /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {% endif %}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {% if site_name %}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class="heading-responsive-4xl font-[var(--hgc-font-weight-h1)]"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {{ site_name }}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {% endif %}</pre><h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Install theme and disable site name in Site Branding component.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Use different variable for for alt text or use same convention found in core themes:</p> <pre>&nbsp;&nbsp;&nbsp; {% if site_logo %}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;a href="{{ path('&lt;front&gt;') }}" rel="home" class="site-branding__logo"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;img src="{{ site_logo }}" alt="{{ 'Home'|t }}" fetchpriority="high"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/a&gt;<br>&nbsp;&nbsp;&nbsp; {% endif %}</pre>
issue