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

summary element definition does not reflect implementations #2246

Closed
stevefaulkner opened this issue Jan 5, 2017 · 11 comments · Fixed by #2256
Closed

summary element definition does not reflect implementations #2246

stevefaulkner opened this issue Jan 5, 2017 · 11 comments · Fixed by #2256
Assignees

Comments

@stevefaulkner
Copy link
Contributor

In all implementations: blink/webkit/firefox the summary element is an interactive element. It receives focus and is operated to open/close the details element. It is also exposed as a control via acc APIs in all implementations.

Suggest the spec should be updated to reflect this.

@annevk
Copy link
Member

annevk commented Jan 5, 2017

Yeah, we should probably define activation behavior for it.

domenic added a commit that referenced this issue Jan 10, 2017
Fixes #2246. This also fixes the value that the open attribute is set to
to be the empty string, instead of "open", matching existing
implementations.
@domenic domenic self-assigned this Jan 10, 2017
@stevefaulkner
Copy link
Contributor Author

suggest the following also need to be updated:

Categories:
None.
Contexts in which this element can be used:
As the first child of a details element.
Content model:
Either: phrasing content.
Or: one element of heading content.

https://html.spec.whatwg.org/multipage/forms.html#the-summary-element

and https://html.spec.whatwg.org/multipage/forms.html#the-details-element

@domenic
Copy link
Member

domenic commented Jan 14, 2017

@stevefaulkner why would those be updated? They're unrelated to the activation behavior.

@stevefaulkner
Copy link
Contributor Author

stevefaulkner commented Jan 14, 2017

@domenic summary is a focusable interactive element?

as per https://html.spec.whatwg.org/multipage/dom.html#interactive-content-2

@domenic
Copy link
Member

domenic commented Jan 14, 2017

Sure, in some browsers it does have the tabindex focus flag set. Why does that impact the categories or content model?

@stevefaulkner
Copy link
Contributor Author

because its interactive content "Interactive content is content that is specifically intended for user interaction."

@domenic
Copy link
Member

domenic commented Jan 14, 2017

I see, we need to update the definition of the interactive content category to include it (when it meets the requirements)

@stevefaulkner
Copy link
Contributor Author

stevefaulkner commented Jan 14, 2017

Also details is listed as interactive content, when it doesn't appear to be.

@domenic
Copy link
Member

domenic commented Jan 14, 2017

Ah yeah OK, so summary should not be; details covers that case. This is especially important, e.g., for details elements without a summary.

(Remember interactive content is a content category for authoring requirements, separate from the activation behavior which defines the processing model.)

Another good example of this is how video (with controls) is interactive content, even though the element itself is not interactive, the controls inside of it are. Similarly details is interactive content, even though actually it's the UA-generated widget whose contents are drawn from the summary element that are interactive, not the whole details.

@stevefaulkner
Copy link
Contributor Author

ok

@zcorpan
Copy link
Member

zcorpan commented Jan 19, 2017

Hmm. I think there's a piece missing in the content models. The summary element should disallow interactive descendants. Filed #2272

domenic added a commit that referenced this issue Jan 19, 2017
Fixes #2246. This also fixes the value that the open attribute is set to
to be the empty string, instead of "open", matching existing
implementations.

Tests at web-platform-tests/wpt#4539 show that
both implementers of <details> follow these same semantics, despite
there having been no spec previously. The only exception is that Blink
included a being-rendered check, but that was removed; see
https://bugs.chromium.org/p/chromium/issues/detail?id=681711.

There's still some discussion ongoing as to whether we should change the
content models to disallow interactive descendants of <summary>
elements, happening in #2272.
alice pushed a commit to alice/html that referenced this issue Jan 8, 2019
Fixes whatwg#2246. This also fixes the value that the open attribute is set to
to be the empty string, instead of "open", matching existing
implementations.

Tests at web-platform-tests/wpt#4539 show that
both implementers of <details> follow these same semantics, despite
there having been no spec previously. The only exception is that Blink
included a being-rendered check, but that was removed; see
https://bugs.chromium.org/p/chromium/issues/detail?id=681711.

There's still some discussion ongoing as to whether we should change the
content models to disallow interactive descendants of <summary>
elements, happening in whatwg#2272.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants