RE: ARIA role nesting and validation

Hi both,

I also detected that the Content Model<https://www.w3.org/TR/html53/dom.html#content-model> section for Elements in HTML 5.3 spec is exactly what I was looking for.

I hope that the https://w3c.github.io/html-aria/#allowed-aria-roles-states-and-properties Descendant restrictions column content is perfectly in sync with it 😊

Validators often punish incorrect HTML element nesting but rarely forbidden respective ARIA role nesting, something that is not really it the spirit of host language role parity thinking. I think they need to improve here.

Best,
Stefan


From: Steve Faulkner <faulkner.steve@gmail.com>
Sent: Wednesday, June 19, 2019 9:33 AM
To: James Nurthen <nurthen@adobe.com>
Cc: Schnabel, Stefan <stefan.schnabel@sap.com>; public-aria@w3.org
Subject: Re: ARIA role nesting and validation

Hi all, the ARIA in HTML spec may be helpful in this regard as it maps roles to content kind and provides nesting restrictions for HTML content.

Refer to the last 2 columns of the ARIA states and properties table under https://w3c.github.io/html-aria/#allowed-aria-roles-states-and-properties




--

Regards

SteveF
Accessibility is political[Image removed by sender. ✊]
Working for the web<https://twitter.com/stevefaulkner/status/940835584410574850>,
anywhere and everywhere [Image removed by sender. 🖖🏽]


On Tue, 18 Jun 2019 at 17:13, James Nurthen <nurthen@adobe.com<mailto:nurthen@adobe.com>> wrote:
HTML defines its validation model – for the <a> element it is at

https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element


The <a> element allows the following content model
Transparent<https://html.spec.whatwg.org/multipage/dom.html#transparent>, but there must be no interactive content<https://html.spec.whatwg.org/multipage/dom.html#interactive-content-2> or a<https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element> element descendants.

So <button> is not allowed as a child of <a> as it is interactive content.

ARIA likewise defines its own validation rules. There is currently no concept like content model in html except for the following:

·       Children Presentational: True

·       Roles which have required child elements
Neither of these fits for links. You are welcome to file an issue to create something like a content model in ARIA.

My non chair hat opinion is that this is a bit of a heavy solution. I certainly don’t want to replicate the specifics of HTML’s child content model as not all of the reasons are accessibility related. We only want to prohibit content which is problematic for accessibility.

With my chair hat on we will of course consider any proposals but this will not be in the 1.2 timeframe.

Regards,
James

James Nurthen  |  Accessibility Engineer  |  Adobe  |  p. 415.832.2734  |  c. 415.987.1918  |  nurthen@adobe.com<mailto:nurthen@adobe.com>



From: "Schnabel, Stefan" <stefan.schnabel@sap.com<mailto:stefan.schnabel@sap.com>>
Date: Tuesday, June 18, 2019 at 8:33 AM
To: James Nurthen <nurthen@adobe.com<mailto:nurthen@adobe.com>>
Cc: "public-aria@w3.org<mailto:public-aria@w3.org>" <public-aria@w3.org<mailto:public-aria@w3.org>>
Subject: 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, 4 February 2020 08:50:13 UTC