Re: [w3ctag/design-reviews] Soft Navigations (Issue #879)

> It seems to provide a definition for what a [contentful, paintable element](https://www.w3.org/TR/paint-timing/#contentful) is, what the first contentful paint is, and which CSS images are [contentful](https://www.w3.org/TR/paint-timing/#contentful-image), but we're not quite sure how a contentful paint is defined and how this heuristic avoids false positives (e.g. hover effects that change a CSS background being counted as soft navigations).

In terms of spec, any paint that's [considered for LCP](https://w3c.github.io/largest-contentful-paint/#potentially-add-a-largestcontentfulpaint-entry) is one that soft navigations consider as a contentful paint. This area (PaintTiming+LCP) is currently in the process of being rewritten to make it clearer.

^^ @clelland

In terms of hover effects, they may be considered as a contentful paint, but won't be counted as a soft navigation since:
* "hover" is not considered a user interaction (only "click" and keyboard events would). Reexamining the relevant [algorithm](https://wicg.github.io/soft-navigations/#handle-event-callback), it seems like it's buggy. I'll fix it and add clarifications to the explainer.
* Only paints on elements that were [appended into the DOM](https://wicg.github.io/soft-navigations/#node-appended-by-soft-navigation) as a result of the interaction event will be counted as relevant contentful paints for soft navigation purposes.

> Also, as a general principle, when introducing heuristics, it's generally [good to also introduce a way to override the heuristic](https://github.com/w3ctag/design-principles/issues/455).

This seems like a useful principle! There's already https://github.com/WICG/soft-navigations/issues/13 requesting this. I agree that it can be useful, but given the analytics-only nature of the feature, I also agree that it's non-blocking.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/879#issuecomment-1829427612
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/879/1829427612@github.com>

Received on Tuesday, 28 November 2023 09:31:41 UTC