You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a code comment on backdrop/backdrop#4797 a request has been made to take care of existing titles in SVG elements:
I realize that this is not part of the scope here, but is this whole code here making an assumption that the given svg does not have an existing <title>? 🤔
This concern's valid - given, this function is available for other SVG types, not only icons (which usually don't have any title child elements).
But as it is/was out of scope in #6613, and desired behavior's still to determine - and to not block the bugfix - we decided to discuss this in a follow-up.
Additional information
Function image_add_svg_attributes() has been added in Backdrop 1.28.0, core/includes/image.inc
Its current purpose and only usage is to deal with alt attributes in SVG icons, core/includes/icon.inc
But the function name suggests, that there could be additional use cases
Now, if calling image_add_svg_attributes() like that, with alt set to an empty string - what should happen?
And what should happen, if it's a non-empty string?
Description of the task
In a code comment on backdrop/backdrop#4797 a request has been made to take care of existing titles in SVG elements:
^^ raised by @klonos
This concern's valid - given, this function is available for other SVG types, not only icons (which usually don't have any
title
child elements).But as it is/was out of scope in #6613, and desired behavior's still to determine - and to not block the bugfix - we decided to discuss this in a follow-up.
Additional information
alt
attributes in SVG icons, core/includes/icon.incTo have something to play with:
And now with a title child:
Now, if calling image_add_svg_attributes() like that, with alt set to an empty string - what should happen?
And what should happen, if it's a non-empty string?
And for completeness: what are the use-cases to deal with?
The text was updated successfully, but these errors were encountered: