Bug 249594 - HTML details marker does not update when CSS display: contents is applied
Summary: HTML details marker does not update when CSS display: contents is applied
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 16
Hardware: Mac (Intel) macOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks: 252223
  Show dependency treegraph
 
Reported: 2022-12-19 10:41 PST by Šime Vidas
Modified: 2023-11-08 09:28 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Šime Vidas 2022-12-19 10:41:32 PST
Steps to reproduce:

1. Open https://jsbin.com/yaxizom/edit?html,css,output
2. Click “Details”

What happened:

The triangle marker ▶︎ does not change.

What should have happened:

The marker should have turned down (▼). It does in Chrome and Firefox.
Comment 1 Šime Vidas 2022-12-19 10:53:33 PST
I’ve checked how VoiceOver is affected. The collapsed state is announced, but the expanded state isn’t.
Comment 2 Karl Dubost 2022-12-19 18:08:46 PST
In the section https://drafts.csswg.org/css-display/#unbox

> Appendix B: Effects of display: contents on Unusual Elements
> Some elements aren’t rendered purely by CSS box concepts; 
> for example, replaced elements (such as img), many form 
> controls (such as input), and SVG elements.
> 
> This appendix defines how they interact with display: contents.
> 
> HTML Elements
>
> … cut for brevity …
> 
> button
> details
> fieldset
> These elements don’t have any special behavior; display: contents 
> simply removes their principal box, and their contents render as normal.
> 



https://searchfox.org/wubkat/rev/05f693e31a84e598a51d00bf3505f1e10049bbc5/Source/WebCore/html/HTMLSummaryElement.cpp
Comment 3 Radar WebKit Bug Importer 2022-12-19 18:08:57 PST
<rdar://problem/103539240>
Comment 5 Darin Senneff 2023-11-08 09:28:45 PST
Confirmed that this is still present in Safari 17.1 on MacOS.

Adding the CSS "display: contents;" on the 'details' element causes the disclosure triangle to remain pointing sideways in both open and expanded states.