empty-heading-matches should use getRole() to account for presentation conflict resolution
The following should fail the empty-heading rule, it is instead considered inapplicable because of role=none. However, role=none is in practice ignored because of the use of aria-label. As a global attribute, aria-label tells browsers to ignore role=none. This can be solved by updating the rules/heading-matches.js, replacing its custom role computation with the aria.getRole() commons method, which already account for presentational role conflict resolution.
<h1 aria-label="" role="none"></h1>
@WilcoFiers
aria.getRole() replaced the custom logic as part of PR #3582.
I introduced two new tests to cover this case there since it was changing anyway:
Validated with the latest develop branch code base,
seeing empty-heading failure on <h1 aria-label="" role="none"></h1> , when role=none. (using latest axe-core rule4.4.3)
With the old rule set (4.3.5), not seeing any failure on empty-heading with the said snippet.
