ARIA role nesting and validation

Hi James,

I've noticed that

<div role="link">
  <div role="button">Foo</div>
</div>

In https://validator.nu/ does not give any error whereas

<a href=http://somewhere.com>
  < button>Bar</button>
</a>

is reported as

"Error: The element button must not appear as a descendant of the a element."

I think this goes deep.

Isn't it so that the same forbidden nesting rules for HTML also must apply for ARIA role nesting?
Can anybody point me to the location in the ARIA spec that says that explicitly?
If not, were there any reasons that prohibited that?

But if so, isn't this a bug for validators github?
And where is the reference overview of allowed/forbidden HTML nestings?

I would be VERY happy if we can clarify this.

Regards
Stefan

Received on Tuesday, 18 June 2019 15:33:49 UTC