h1-h6 allows phrasing content
https://html.spec.whatwg.org/multipage/dom.html#phrasing-content-2
aria in html role=heading allows
Flow content but with no main element, heading content, sectioning content, or sectioning roots descendants.
https://www.w3.org/TR/html-aria/#allowed-descendants-of-aria-roles
which results in less than optimal markup patterns being allowed. refer to validator/validator#1282 as an example. I suggest the allowed descendants rule for role=heading be tightened up.