No, much less makes sense.
The element <span>
allows only the global attributes of HTML and alt
You’re not one of them. Otherwise, apparently this image is part of the content of the page, unlike it would not need an alternative message, which is what the attribute alt
define. Since the image is part of the content it should necessarily be in an element <img>
. Put it as the bottom of a <span>
is what we call gambiarra.
However, if the image itself is not part of the content and is merely an aesthetic detail, then you will have no problem leaving it as the background, but then the alternative message is completely unnecessary - by the way, why would define an alternative content for what does not belong to the content?
It will be up to you to evaluate. If it is part of the content, remove this element <span>
and remake correctly using the element <img>
. If it is merely aesthetic, remove the attribute alt
element. Including the attributes role
and aria-label
will not make sense in that case either.
I think you’ll be interested! https://answall.com/questions/341096/como-colocar-alt-em-uma-background-image-como-deixar-uma-background-image-mais
– hugocsl