Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

details Element Should Not Be a Sectioning Root for Outline Algorithm #2447

Closed
patrickdark opened this issue Mar 19, 2017 · 2 comments
Closed

Comments

@patrickdark
Copy link

patrickdark commented Mar 19, 2017

Consider this HTML:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Test</title>
	</head>
	<body>
		<h1>Page Title</h1>
		<nav>
			<details>
				<summary>
					<h1>Navigation Heading</h1>
				</summary>
				<main>
					<p>This is filler content.</p>
				</main>
			</details>
		</nav>
		<section>
			<details>
				<summary>
					<h1>Heading 1</h1>
				</summary>
				<main>
					<p>This is filler content.</p>
				</main>
			</details>
		</section>
		<section>
			<details>
				<summary>
					<h1>Heading 2</h1>
				</summary>
				<main>
					<p>This is filler content.</p>
				</main>
			</details>
		</section>
		<section>
			<details>
				<summary>
					<h1>Heading 3</h1>
				</summary>
				<main>
					<p>This is filler content.</p>
				</main>
			</details>
		</section>
	</body>
</html>

(I'm using XSLT to remodel all nav and section elements into like structures.)

Intuitively, this document has a page title with four page headings.

Per my reading of the spec at https://html.spec.whatwg.org/multipage/semantics.html#sectioning-root, however, this document has a page title and four untitled sections. This seems to be confirmed by the Nu Html Checker at https://validator.w3.org/nu/?showoutline=yes#textarea.

The four details elements instead create four localized outlines. I can't figure out how that's more useful than making them transparent for the sake of the outline algorithm.

It seems that the details element should be undesignated as a sectioning root. At a minimum, there should be a note at https://html.spec.whatwg.org/multipage/forms.html#the-details-element describing this element as a sectioning root with a warning about this coding pattern not behaving as expected.

@patrickdark patrickdark changed the title details Element Should Not Be a Sectioning Root details Element Should Not Be a Sectioning Root for Outline Algorithm Mar 19, 2017
@zcorpan zcorpan added addition/proposal New features or enhancements normative change and removed addition/proposal New features or enhancements labels Sep 1, 2018
@zcorpan
Copy link
Member

zcorpan commented Sep 1, 2018

This was introduced in 7983b29

https://lists.w3.org/Archives/Public/public-whatwg-archive/2009Oct/0422.html

It would be helpful to analyze usage in httparchive to inform what to do here.

@zcorpan
Copy link
Member

zcorpan commented May 29, 2023

Sectioning root was removed in #7829

@zcorpan zcorpan closed this as completed May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants