If they're the same, a screen reader will read it twice.

I found this approach in core #2780293: Add GUI to configure the site's logo alt attribute, but it does not seem to be willingness to bring this really in.

For now I would just use the site name for the alternate text of the logo image.

Comments

ytsurk created an issue. See original summary.

ytsurk’s picture

Issue tags: -accessibility +Accessibility
StatusFileSize
new1.42 KB
pivica’s picture

Issue tags: -Accessibility +accessibility

This makes total sense to me.

+++ b/themes/bs_bootstrap/bs_bootstrap.theme
@@ -272,6 +273,9 @@ function bs_bootstrap_preprocess_block(&$variables) {
+      $variables['xss_safe_img_alt'] = t('@site_name logo', ['@site_name' => Xss::filter($config->get('name'))]);

What do you think that we use some more sensible name here for this variable, instead of 'xss_safe_img_alt' something like 'site_logo_alt_text'?

ytsurk’s picture

StatusFileSize
new1.43 KB

Totally agree - here a patch with the update variable name.

  • pivica committed 163ba09 on 8.x-1.x authored by ytsurk
    Issue #3031400 by ytsurk, pivica: Branding block's anchor title and img...
pivica’s picture

Status: Active » Fixed

Great, committed.

ytsurk’s picture

Just tested with the NVDA screenreader, and it reads only the img alt, not the link title .. plus the url.

Still it makes sense ..

pivica’s picture

> Just tested with the NVDA screenreader, and it reads only the img alt, not the link title .. plus the url.

Does it says at least 'link' before or after the image alt.

> Still it makes sense ..

Agree.

Status: Fixed » Closed (fixed)

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

andrewmacpherson’s picture

Issue tags: -accessibility (duplicate tag) +Accessibility

fixing accessibility tag