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.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | After patch.png | 28.7 KB | mitthukumawat |
| #9 | Before patch.png | 99.4 KB | mitthukumawat |
Comments
Comment #2
dqdComment #3
andrewmacpherson commentedThis 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.
Comment #6
lokeshsahu commentedComment #7
lokeshsahu commentedI have created a patch for the above issue, please let me know if it is working fine.
i have added a screenshot for reference.
Comment #8
lokeshsahu commentedComment #9
mitthukumawat commentedI 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.
Comment #10
mitthukumawat commentedComment #13
lauriiiI 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!