Problem/Motivation

In Drupal 8 default installation and most of the common contributed themes (I am not sure about Bartik yet) the Site branding block provides the options to set up visibility of "Logo", "Site name" and "Slogan" individually and if turned off, the block renders "Site name" visually hidden for screen readers, accessibility and search engine optimization.

In the Umami profile the setting has no effect and "Site name" keeps being rendered visually-hidden, no matter if this has been turned on or off by the user in the Site branding block configuration settings page.

Proposed resolution

It seems the Umami Food Magazien theme overrides the Sitebranding blocks default behaviour and forces Site name to be rendered with the HTML attribute class "visually-hidden" added, no matter what the user sets in the block. We should revert that.

Remaining tasks

Add an if condition the theme template function and template file to check for the setting made by the user.

User interface changes

No changes needed. Settings should just work like expected if fixed.

API changes

No APi changes required.

Data model changes

No data model changes required.

Comments

diqidoq created an issue. See original summary.

dqd’s picture

Issue summary: View changes
andrewmacpherson’s picture

This is already part of #3000724: Fix accessibility problems in Umami's branding block, but that issue is postponed by #2780293: Add GUI to configure the site's logo alt attribute.

The logo used by the Umami demo is an image of text. Site builders can change the logo image, but it's currently not possible for them provide an appropriate text alternative for the logo image. All core themes use a hard-coded alt="home".

So the Umami demo currently uses a visually-hidden site name, as the text alternative for the preceding logo. This is far from ideal, because it leaves us with a visually-hidden link. But it's a trade-off between a couple of WCAG failures at level-A (poor alt text, and link purpose) vs. level-AA (focus visible).


There's no point in having a visually-hidden site slogan. It should either be rendered visually, or omitted entirely. All of the other core themes do this.

It would be worth removing the visually-hidden class from Umami's site slogan as a quick win, without waiting for #2780293: Add GUI to configure the site's logo alt attribute.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

lokeshsahu’s picture

Assigned: Unassigned » lokeshsahu
lokeshsahu’s picture

StatusFileSize
new908 bytes
new35.93 KB
new26.52 KB

I have created a patch for the above issue, please let me know if it is working fine.
i have added a screenshot for reference.

lokeshsahu’s picture

Assigned: lokeshsahu » Unassigned
Status: Active » Needs review
mitthukumawat’s picture

StatusFileSize
new99.4 KB
new28.7 KB

I have applied the patch and it is working fine. I can see the site-name div is visually-hidden by default. Now after the patch, site name is appearing as expected.
Adding screenshots for reference.

mitthukumawat’s picture

Status: Needs review » Reviewed & tested by the community

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

  • lauriii committed 3d6974d on 9.3.x
    Issue #3129666 by lokeshsahu, diqidoq, andrewmacpherson: Site branding...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

I think this is a nice quick win because it makes the feature not seem broken. It would be nice to have some more unique designs for these elements but it might not be necessary since I don't think this is something we necessarily intend to support in Umami.

Committed 3d6974d and pushed to 9.3.x. Thanks!

Status: Fixed » Closed (fixed)

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