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)
Comment | File | Size | Author |
---|---|---|---|
#7 | 2942007 - 3.png | 313.65 KB | navneet0693 |
#7 | 2942007 - 2.png | 569.68 KB | navneet0693 |
#7 | 2942007 - 1.png | 446.92 KB | navneet0693 |
#4 | footer-block-mobile-after.png | 108.57 KB | David_Rothstein |
#4 | footer-block-mobile-before.png | 108.53 KB | David_Rothstein |
Comments
Comment #2
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedComment #3
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedHere 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.
Comment #4
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedHere are before/after screenshots showing the slight difference at mobile screen widths.
Before patch:
After patch:
Comment #5
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedRegarding 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.
Comment #6
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedAll 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.
Comment #7
navneet0693 CreditAttribution: navneet0693 as a volunteer and at QED42 commented3 issue bundle image is now an image field :
Alt text presence on image:
Mobile screen:
Comment #9
Gábor HojtsyLooks like a great update. Agree with the improvement in terms of demonstration of Drupal's capabilities but also in terms of accessibility. Win-win :)