Heading attributes are not limited to classes and ids but any type of attributes.
I think that supporting the Pandoc definition would be a good improvement: https://pandoc.org/MANUAL.html#extension-header_attributes.
If this feature seems desirable but maintainers cannot work on it, please reach me to work in a pull request.
Thanks.