Html: Shadow DOM and semantic HTML

Created on 12 Feb 2020  路  1Comment  路  Source: whatwg/html

This is a request for clarification regarding the use of main element and of h1-h6 elements inside a Shadow DOM, specifically:

  1. A non-hidden main element is defined as being unique in a document. In this respect, can each Shadow DOM be considered a separate document? If the Shadow DOM of two web components each contain a main element, can the web components be used in the same document?

  2. If the Shadow DOM of a web component contains the title of a page (h1 element and possibly other widgets) and each section of that page is placed in another web component containing the section title (h2 and related text), is this a correct way to mark up the heading relationships of the page? In other words, is it permitted to respect the hierarchy of headings in different (but related) web components?

accessibility clarification shadow

Most helpful comment

This needs clarification in the standard I think, but given how AT operates on the flat tree you have to assume that roles (and aria-level, if applicable) are global. More features might be warranted here in due course, but that's a separate discussion.

So 1 is no and 2 is yes, afaik.

cc @whatwg/a11y

>All comments

This needs clarification in the standard I think, but given how AT operates on the flat tree you have to assume that roles (and aria-level, if applicable) are global. More features might be warranted here in due course, but that's a separate discussion.

So 1 is no and 2 is yes, afaik.

cc @whatwg/a11y

Was this page helpful?
0 / 5 - 0 ratings