It is not. Attributes can only be specified for block elements. Comparing the three render hooks:
Render Hook | Element | Type | Attribute Support |
---|---|---|---|
render-link.html | <a> |
inline | No |
render-image.html | <img> |
inline | No |
render-heading.html | <h1-6> |
block | Yes |
See comments:
https://github.com/gohugoio/hugo/pull/8271