diff --git a/phpBB/phpbb/template/twig/extension/icon.php b/phpBB/phpbb/template/twig/extension/icon.php
index f96ed94821..2cf9bd353e 100644
--- a/phpBB/phpbb/template/twig/extension/icon.php
+++ b/phpBB/phpbb/template/twig/extension/icon.php
@@ -164,7 +164,7 @@ class icon extends \Twig\Extension\AbstractExtension
'CLASSES' => (string) $classes,
'ICON' => (string) $icon,
'SOURCE' => (string) $source,
- 'TITLE' => (string) $title,
+ 'TITLE' => (string) $title && $type === 'svg' ? unique_id() : '',
'VIEW_BOX' => (string) $view_box,
'S_HIDDEN' => (bool) $hidden,
]);
@@ -258,7 +258,7 @@ class icon extends \Twig\Extension\AbstractExtension
* 'lock': topicrow.S_TOPIC_LOCKED,
* 'fire': topicrow.S_TOPIC_HOT,
* 'file': true,
- * }, 'MY_TITLE', true) }}
+ * }, lang('MY_TITLE'), true) }}
*
* @param array $icons Array of icons and their booleans
* @return string The first 'true' icon
diff --git a/phpBB/styles/all/template/macros/icons/iconify.twig b/phpBB/styles/all/template/macros/icons/iconify.twig
index 5a4387b497..9287bbaf8e 100644
--- a/phpBB/styles/all/template/macros/icons/iconify.twig
+++ b/phpBB/styles/all/template/macros/icons/iconify.twig
@@ -1,3 +1,4 @@
{% apply spaceless %}
- {% if TITLE %}{{ lang(TITLE) }}{% endif %}
+
+{% if TITLE %}{{ TITLE }}{% endif %}
{% endapply %}
diff --git a/phpBB/styles/all/template/macros/icons/svg.twig b/phpBB/styles/all/template/macros/icons/svg.twig
index 3a2128ff9f..f84b6f3e71 100644
--- a/phpBB/styles/all/template/macros/icons/svg.twig
+++ b/phpBB/styles/all/template/macros/icons/svg.twig
@@ -1,6 +1,4 @@
{% apply spaceless %}
- {% set TITLE_ID = TITLE ? TITLE|lower|replace({' ': '_'}) ~ '-' ~ random() %}
-