As a followup to #2938900: Replace profile-defined blocks with custom blocks to fix a variety of problems, we can change the "3 issue bundle" image associated with the footer promo block from a background image (which is hardcoded via the theme) to an image field (which the user is allowed to configure).

This is a better demonstration of Drupal's capabilities, since it allows the site administrator to change the content and configuration of this image, rather than having the theme dictate it.

It is also an accessibility improvement. Currently this image has no alt text, even though it clearly contains information that a screen reader user can't obtain elsewhere (in particular, the "3 issue bundle" text embedded inside the image). With this patch, the field gets alt text like other image fields do. (See also: #2938643: Umami Banner Block does not have accessible text alternative at wide viewport)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

David_Rothstein created an issue. See original summary.

David_Rothstein’s picture

Issue summary: View changes
David_Rothstein’s picture

Status: Active » Needs review
FileSize
11.81 KB

Here is a patch.

Visually, there are essentially no changes here, although there is a slight change in the vertical spacing when the block is displayed on mobile. I didn't bother tracking it down for now, because it's a small difference and I think the new version looks at least as good anyway.

David_Rothstein’s picture

Here are before/after screenshots showing the slight difference at mobile screen widths.

Before patch:

After patch:

David_Rothstein’s picture

Regarding the image alt text, I made the alt text on this new field non-required for now (to match the way the banner block's image field is configured). However, I wonder if it should be required after all, given the different purpose of this image compared to the banner image?

It would be useful to get an accessibility review on that aspect - although clearly, this patch represents an overall accessibility improvement either way.

andrewmacpherson’s picture

All good from my point of view, let's leave the text alternative as optional for the footer promo block type.

The image fields on banner and footer promo blocks have a use-case which is only loosely defined, compared to the image fields on Recipe nodes or Users. The justification I gave for for banner blocks applies just as well here, see #2938170-26: Enable ALT text for Banner Block image field..

Someone else should RTBC this, I only had time for a brief glance at the patch.

navneet0693’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
446.92 KB
569.68 KB
313.65 KB

3 issue bundle image is now an image field :

edit screen of 3 issue bundle image block

Alt text presence on image:

3 issue bundle image alt text dev tools

Mobile screen:

3 issue bundle image mobile screenshot

  • Gábor Hojtsy committed f00dc67 on 8.6.x
    Issue #2942007 by David_Rothstein, navneet0693, andrewmacpherson: Move...
Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Looks like a great update. Agree with the improvement in terms of demonstration of Drupal's capabilities but also in terms of accessibility. Win-win :)

Status: Fixed » Closed (fixed)

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