Problem/Motivation
The administrative list template admin/admin-block-content.html.twig was reverted to a <div> based list (like Claro). This change also included a HTML ID for aria purposes:
{% set description_id = item.title|clean_id ~ '-desc' %}
<div class="admin-item__title" aria-details="{{ description_id }}">{{ item.title }}</div>
<div class="admin-item__description" id="{{ description_id }}">{{ item.description }}</div>
This code fails if the item.title is a render array, because clean_id expects a string as parameter. But contrib might preprocess titles into render arrays, e.g. because we want add icons to titles.
AFAIK this problem does currently not happen with plain core, so I guess this is only minor.
Proposed resolution
Enforce the title is already stringified before passing it to |clean_id
{% set description_id = item.title|render|clean_id ~ '-desc' %}
Comments
Comment #6
saschaeggiMakes total sense ✔️