Problem/Motivation

In the BEM theme, the home/logo image in the System Branding block uses the default alt text (`home`).
That alt text is not descriptive enough for accessibility and should use contextual site branding text instead: `Logo of {{ site_logo_name }}`.

Steps to reproduce

1. Enable BEM and place the Site branding block.
2. Configure a site logo and site name.
3. View the rendered branding block and inspect the logo image.
4. Note that the logo image alt text is the default (`home`) instead of `Logo of {{ site_logo_name }}`.

Proposed resolution

- Add a BEM override for the branding block template: `templates/block--system-branding-block.html.twig`.
- Add preprocess handling for `system_branding_block` in `bem.theme`.
- Provide a `site_logo_name` variable when logo output is available.
- Set the logo image alt text to `Logo of {{ site_logo_name }}` in the template.
- Keep translatable homepage labels for links.

Remaining tasks

- Verify alt text output with logo + site name configured.
- Verify fallback behavior when logo or site name is missing.
- Verify no regressions in Site Branding block rendering.

User interface changes

Yes.
The Site branding block output is overridden, including logo image alt text.

API changes

No.

Data model changes

None.

Issue fork bem-3592496

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pjotr van der horst created an issue. See original summary.

pjotr van der horst’s picture

Title: logo is default 'home' which is not a11y » logo is default 'home' which is not accessible

pjotr van der horst changed the visibility of the branch 8.x-3.x to hidden.

timohuisman’s picture

Title: logo is default 'home' which is not accessible » Add site name to logo alt text for accessibility
Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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