Roots Discourse

Menu building setting individual data-text on li element

I only found this Add data attribute to 'li' element in WP Nav
But unfortunately I can’t really tell from this only. there is also a 404 at the given link.

So, how would you go about adding data attributes on the menu li elements, which hold the title of the link?