Closed (fixed)
Project:
Drupal core
Version:
10.1.x-dev
Component:
Olivero theme
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Jul 2021 at 12:16 UTC
Updated:
14 Feb 2023 at 11:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gauravvvv commentedI have provided a patch. Please review.
Comment #3
kostyashupenkoFixed / optimized some things
Comment #4
indrajithkb commentedHi @Gauravmahlawat, @kostyashupenko nice catch and work, I have checked the file, now we can see the raw svg is removed from block--system-powered-by-block.html.twig.
Moving to RTBC
Comment #7
gauravvvv commentedRandom failure.
Comment #8
alexpottThe issue summary says:
Why should we do that? Also as we're including the svg via an @include I'm not sure of the difference.
Comment #9
vikashsoni commented@Gauravmahlawat I have checked the patch after patch svg has been removed
Thanks for the patch
Comment #13
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #need-reveiw-queue. We are working to keep the size of Needs Review queue [2700+ issues] to around 200, following Review a patch or merge require as a guide.
As mentioned in #8 what is the "why" if you can update the issue summary with that please.
Comment #14
gauravvvv commentedSo that we can use this icon on other places as well. If we have this icon in Images directory, we can use this icon on different places by just including the icon in twig or adding as background-image.
By the current scenario we need to duplicate the icon on different places. Hope this answers.
Comment #15
markconroy commentedI'm not fully sure about moving this to an /images or /assets folder.
If we do that, then we can't import it via
@importin twig because it will be outside of the templates folder (so not accessible without the use of something like components module).If we add it via
<img src="path/to/images/drupal-logo.svg" />then you can't do anything with it in CSS such as change path fill colours, etc.Where it currently is may not be the best solution, but given we are working with only Drupal core and no contrib modules, it might be okay for now.
Comment #16
gauravvvv commentedWe can use include to add the SVG image. We're already doing it in different places in the Olivero theme.
{% include "@olivero/../images/site-under-maintenance-icon.svg" %}Check Olivero maintenance page template here
Comment #17
markconroy commentedWhaaaaat? I never realised you could use
..to go back up a level and get out of the templates directory forincludein Twig. That's opening up a who new set of possibilities. Sorry, that's an aside!Also, I've updated the issue summary with the reasoning behind this change request.
Comment #18
markconroy commented@Gauravmahlawat
This patch looks good to me, and the reasoning for using it looks sound. However, the patch is not currently applying for me. Can you check if it it needs a small re-roll please?
I think it's the spaces just before the closing brackets that might be the issue.
Comment #19
gauravvvv commentedI have re-rolled the patch for 10.1.x, Please review.
Comment #20
markconroy commentedThanks @Gauravmahlawat
This looks good to me, and a nice pattern for others to follow. Marking RTBC.
Comment #21
longwaveWe can't use Twig syntax in the aria-label in an SVG file, if it is to be used as a raw SVG?
Comment #22
gauravvvv commentedRemoved TWIG syntax. Please review
Comment #23
longwaveThis means we lose translations of the accessibility label. @markconroy can you think of a way around this? We could name the file .svg.twig, but that reduces reusability. Is there another way?
Comment #24
gauravvvv commentedNo other SVG image file has aria-label in the Olivero theme. Parent element of this SVG image has aria-label.
<span class="drupal-logo" aria-label="Logo Drupal">Comment #25
markconroy commentedI think #22 looks good enough now. As @Gauravmahlawat says, no other SVG in using an aria-label in it in this theme, and we have a wrapper with an aria-label to announce what the SVG is.
I'd propose moving this back to RTBC. @longwave do you have any disagreement?
Comment #26
longwaveOK, as the parent has aria-label I think that should be sufficient for accessibility (and in fact perhaps better, as we don't repeat the label on the span and the svg itself).
Comment #27
alexpottCommitted c1437df and pushed to 10.1.x. Thanks!
The reasoning and the considerations of aria labels are good to have on the issue. Nice work.