Details/summary-based accordion: Zendesk source editor removes 'name' attribute



已于 2025年3月25日 发布

Hi everyone, 

We are using accordion functionality in our Help Center a lot. Currently, I'm switching from a CSS/JavaScript-based solution to using <details> and <summary>. It is the most accessible accordion I found and requires nothing else than HTML. And, of course, it is easy to maintain. 

The HTML only approach has been discussed here since at least 2017, and in this article, Zendesk is listing <details> and <summary> as supported HTML tags. However, I noticed that the Zendesk source editor removes the ‘name’ attribute, with which <details> elements can be grouped. Within a name group, only a single element will be shown at a time. Here's an example. The accordion can still be used in Zendesk without the ‘name’ attribute, but it is unfortunate to have to do without this useful function. 
 

Steps to reproduce: 

  • Open the source editor. 
  • Add ‘name="whatever"’ to a <details> tag so that it reads: < details name="whatever"> (Or simply copy the HTML part of the  example.)
  • Close the editor. 
  • Open the editor again. 
  • The name attribute is gone. 

Maybe someone knows a workaround? 

Anyway, I would appreciate it if Zendesk could get this right soon. 

Cheers,

Georg


0

0

0 条评论

登录再写评论。

找不到所需的内容?

新建帖子