Re: [csswg-drafts] [css-contain-2] Proposal: content-visibility: hidden-matchable (#5595)

The CSS Working Group just discussed `[css-contain-2] Proposal: content-visibility: hidden-matchable`.

<details><summary>The full IRC log of that discussion</summary>
&lt;Rossen_> Topic: [css-contain-2] Proposal: content-visibility: hidden-matchable<br>
&lt;Rossen_> github: https://github.com/w3c/csswg-drafts/issues/5595<br>
&lt;Rossen_> q?<br>
&lt;emilio> q+<br>
&lt;myles> jarhar: content-visibility: hidden-matchable allows the UA to search for content inside the content, for like find-in-page, which will fire an event before the browser scrolls, which allows you to report a match before the browser does. There was a TAG review. We brought up reader mode, a11y, and css property vs html attribute. The TAG review has been approved. Looking forward to the next steps<br>
&lt;smfr> q+<br>
&lt;myles> emilio: I still feel like ... this allows the page to show content in response to ... putting this property on an element interacts with beforematch which allows you to show the content, and the page needs to a handshake with the browser, where the browser fires an event, and asynchronously will restart the search after the next runloop .... I haven't thought deeply about alternative solutions to this, but it sounds like complex, hard-to-get-right<br>
&lt;myles>  solution<br>
&lt;myles> emilio: that's my main concern.<br>
&lt;myles> emilio: I'm not sure how people are going to use this.<br>
&lt;Rossen_> ack emilio<br>
&lt;fremy> q+<br>
&lt;myles> emilio: ideally, i think the UA could show the content instead, but that's hard with it being a CSS property. It being an attribute could maybe allow this, but it restricts how authors can hide the content.<br>
&lt;chrishtr> q+<br>
&lt;tantek> +1 emilio<br>
&lt;Rossen_> ack smfr<br>
&lt;myles> smfr: I just wanted to reiterate what I said in the past. I don't like how we're adding yet another state to the whole display:none content-visible visibilty:hidden matrix. Will add complication in the future. I agree with emilio about the beforematch algorithm is complicated and error-prone. I would prefer the UA is the one to reveal the content.<br>
&lt;myles> smfr: I still think that the fact that UAs that have reader mode basically mostly undoes the optimization that is content-visibility:hidden-matchable is unfortunate. I'm not sure anyone in TAG was representing UAs that have reader mode and would be impacted by that<br>
&lt;myles> Rossen_: we've been shipping reader mode for quite some time<br>
&lt;tantek> +1 strong agreement with smfr. the complexity this adds to the author model (display:none, visibility:hidden, etc.) makes a bad thing worse.<br>
&lt;Rossen_> q?<br>
&lt;myles> smfr: In order to get reader mode correct you have to resolve styles and layout inside content-visiblity:hidden-matchabe, which defeats the optimization wehre the browser can skip layout. So if your UA needs to look through the page content to determine if there is readerable content, itw ould have to do almost all the work you would have to do if you had the real content. So it's unfortunate we've designed a feature that has that performance trap.<br>
&lt;myles>  Performance will not be portable between implementations.<br>
&lt;bkardell_> q+<br>
&lt;myles> Rossen_: You're under the assumption that reader mode won't take advantage of content-visbility:hidden-matchable the way the regular presentation in non-reader mode would do it. I'm not sure how all reader mode implementations are done.<br>
&lt;Rossen_> ack fremy<br>
&lt;myles> fremy: My impression of the use case, let's say you have a book or a long word document, you already know the text on each page, but you don't want to lay out the whole book before the user can see the first page. So you'll put each page in a div, and you want the user to search through the book, and so if the user agent finds some text on page 30, the UA goes to page 30 and says to the website, i'm about to display page 30, please re-lay-out<br>
&lt;myles> fremy: I don't see any other way you can do that optimization. If you were to hook up directly into the browser UI... when i'm first loading the webpage, don't do a whole layout, but when you search on page 30, the browser really needs page 30. Before the browser actually scrolls to page 30.<br>
&lt;myles> fremy: If you have reader mode, it can just stop doing layout eventually... like if you have already 10 pages, just stop laying out, and if the user scrolls, then continue. Or you could skip dirty page of the book and do the layout later. If i have a book, I shoudl be able to say "layout just the pages I need, but search through the entire book"<br>
&lt;smfr> q+<br>
&lt;bkardell_> q-<br>
&lt;Rossen_> ack chrishtr<br>
&lt;tantek> trying to read https://github.com/w3ctag/design-reviews/issues/511 to understand why it was considered acceptable to consider this as a CSS property (seem very much tied to content semantics)<br>
&lt;myles> chrishtr: it's not hard for sites to implement against this feature. We've found the opposite with experiments in partners. These are sections of the UI int he page that are already there and there are already a click handler that shows the hidden section. So the click handler is registered against another event and that's all you do<br>
&lt;myles> chrishtr: All these points about reader mode were discussed multiple times in previous CSSWG meetings. We all agreed we would defer to the upcoming TAG review for them to weigh in on it.<br>
&lt;myles> chrishtr: There are no new arguments here. I am expressing frustration.<br>
&lt;tantek> +1 chrishtr, this is my recollection also<br>
&lt;myles> Rossen_: I appreciate, the function of the TAG is not to make decisions on behalf of CSSWG. CSSWG is the venue for this. it's up to us, not hte TAG<br>
&lt;myles> Rossen_: From architectural poitn of view, it makes sense.<br>
&lt;tantek> +1 myles, we have these issues AND there should be a TAG review<br>
&lt;tantek> q+<br>
&lt;Rossen_> ack smfr<br>
&lt;tantek> q++ emilio<br>
&lt;tantek> qq+ emilio<br>
&lt;tantek> q- +<br>
&lt;tantek> q- later<br>
&lt;myles> smfr: Clarification in response to fremy: find has to resolve styles and do some amount of layout to determine if something should be shown. It will not show things that are 1px tall, not show display:none. So when you have hidden-matchable stuff ... &lt;missed><br>
&lt;myles> smfr: the problem with reader is detection, not display. we show a badge to let the user opt-in to reader.<br>
&lt;Rossen_> ack emilio<br>
&lt;Zakim> emilio, you wanted to react to smfr<br>
&lt;Rossen_> ack emilio<br>
&lt;myles> emilio: regarding complexity: the feature gets disabled once the page happens to not show the element in time. Because that's racey. Not only racey with loading, but other user actions. If the user hides by clicking on the icon in the next event loop turn, the page will not be able to show anything, or find again, ever.<br>
&lt;myles> emilio: There are other tasks that shows the element, the find process is ... you cannot use the feature any more. which is kinda weird<br>
&lt;myles> Rossen_: do we have an issue on this<br>
&lt;myles> emilio: I raised it on the HTML spec issue. This issue is spread around so much, i don't even know where I ....<br>
&lt;myles> emilio: I don't want to formally object, because I don't have a better solution that addresses all the features, but I don't want to be unconstructive. But ....<br>
&lt;fremy> q+<br>
&lt;myles> chrishtr: Can we move forward and work through these issues?<br>
&lt;myles> Rossen_: many issues.<br>
&lt;myles> chrishtr: Can we just resolve that we'll generally add the features and work on the details later<br>
&lt;myles> emilio: the details are important.<br>
&lt;tantek> I would object to starting the work without considering an attribute instead<br>
&lt;tantek> and I think the TAG neglected that part of the review<br>
&lt;tantek> q?<br>
&lt;myles> Rossen_: the expectation is that we're resolving on starting the work, not ending the work. I heard 3 or 4 major issues that people want to put forward for this feature. I didn't hear a major objection that says "the feature doesn't make sense, or belong to CSS" which is what we're trying to identify in order to add this to our charter<br>
&lt;myles> Rossen_: unless we think this doesn't belong to CSS then ....<br>
&lt;myles> tantek: I think it doesn't belong to CSS.<br>
&lt;Rossen_> la<br>
&lt;Rossen_> q<br>
&lt;Rossen_> ack tantek<br>
&lt;myles> tantek: fundamentally this is about the semantics of content. I'm surprised this has gotten this far as a CSS property because this should be in HTML. This is about whether contetn shoudlb e searchable, which is semantic. Meaningful = shows up in searches. I am surprised this even got so far. I read TAG 511, and it's pretty thin on whether it should be a CSS property or an HTML attribute. The TAG didn't come to a good conclusion there. This WG should<br>
&lt;myles>  have the purview to question and push back on.<br>
&lt;myles> tantek: The ergonomic issues that smfr and emilio are sufficient to object to starting work, until: 1. it becomes an HTML attribute, and works well with summary and details elements, which is where the use cases would work "despite the fact it's in details, it should be searchable". Once we get that, then i'd be open to re-opening the discussion about the CSS interaction: the visibility model and teh layout. Until that, we are jumping the gun and it<br>
&lt;myles>  will be bad<br>
&lt;myles> chrishtr: HTML attributes are already brought up to the TAG. Semantics are mixed between CSS and HTML. Alice, and expert, says there are plenty of other semantics things that are in CSS<br>
&lt;Rossen_> q?<br>
&lt;myles> tantek: The excuse "there are already other things in CSS" is not a good excuse at all. Just because there is some overlap doesn't mean we should continue being sloppy. I have great respect for Alice, though.<br>
&lt;Rossen_> Zakim, close queue<br>
&lt;Zakim> ok, Rossen_, the speaker queue is closed<br>
&lt;myles> chrishtr: There are argumetns in the issue about why it makes sense to be a CSS property. Please respond to those. Please look at the issue and see the arguments I'm making, try to respond to them, and we can have a constructive discsusion<br>
&lt;myles> tantek: I did.<br>
&lt;myles> chrishtr: The TAG did think deeply about this.<br>
&lt;tantek> the text in 511 does not back that up<br>
&lt;myles> Rossen_: Yes we did! We considered the presentation model of this, compared to other ways in CSS to hide and reveal content. We did consider HTML API surface and the event model and how it fits. This was not a lightweight flippant "go ahead we don't want to deal with this" review.<br>
&lt;myles> Rossen_: I appreciate the candor here but this is not how things went there.<br>
&lt;myles> tantek: Your description doesn't match issue 511.<br>
&lt;myles> tantek: There needs to be more discussion there.<br>
&lt;myles> Rossen_: Feel free to add to the tag review additional questions or reopening it if you want to.<br>
&lt;myles> Rossen_: if you believe this doesn't belong to CSS primarily, please reopen.<br>
&lt;tantek> if there's an hour of minutes about that, please point to that. that was not clear at all in 511<br>
&lt;myles> Rossen_: This topic has been discussed for hours before in CSSWG, and 1 hour in TAG, specifically on that topic. We did discuss the entire name computation model for aria and other a11y-related topics and whether it makes sense. it does. We talked about the visula presentation and how contents vs content-visiblity and how it works. If we had display-contents:none with searchable, that would be sort of this feature is describing, similar to the way we<br>
&lt;myles>  hide boxes for elements that are represented in HTML and in teh DOM while these elemnts are searchable and machable, with display:contents<br>
&lt;myles> Rossen_: if you're arguing about this not being in CSS, then you're also arguing against a bunch of parts of CSS which have already shipped<br>
&lt;myles> Rossen_: I find it very surprising to hear the fact that you're arguing against a large discussion and reasoning in TAG on the basis, and dismissed it as a "light" discussion. It was not a light discussion. I'm not going to force a resolution though. I will give people 1.5 days to cool off on this issue.<br>
&lt;myles> Rossen_: I'm happy to have this as the opening topic on Thursday when Alan is going to chair. And have the final resolution adopting this as part of CSS charter, and starting work, not ending work, and having this to be formally objected and brought back to the objection counsil for resolution<br>
&lt;tantek> clearly there are many aspects we disagree on<br>
&lt;myles> fremy: smfr, can I talk to you?<br>
&lt;myles> Rossen_: I need to end the meeting. Please don't talk over me. We resume back on thursday afternoon pacific time. Please stay healthy and happy<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5595#issuecomment-776129419 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 9 February 2021 18:02:54 UTC