There are multiple reasons why details/summary are bad semantics, outlined in this article: https://adrianroselli.com/2019/04/details-summary-are-not-in...
The OP widget is non of these, I would say it is an open question whether <details> <summary> is the right choice here.