Consider using the "content-visibility" as a progressive performance enhancement

Created on 29 January 2024, over 1 year ago

Problem/Motivation

Google has called this property out in https://web.dev/articles/dom-size-and-interactivity#use_the_content-visi... and our initial render timing findings on pages with an extreme number of hidden-by-default DOM nodes is quite dramatic.

The `content-visibility` property will prevent user-agents from evaluating certain DOM nodes and descendants based on a heuristic.

Accessibility considerations

Since DOM node evaluation may be skipped by this property, the usual rules applied by things like `display: none` and `visibility: hidden` may not function like one would expect them to! It may become necessary to manually apply other attributes to the DOM (i.e. `aria-hidden`) in order to remove elements from the accessibility tree!

Proposed resolution

  1. Discuss
  2. Find places in core which might benefit from the change
  3. Benchmark the impact of said changes (note, the magnitude of the change is like in the order of milliseconds, except for extreme cases)

User interface changes

None

API changes

None

Data model changes

None

🌱 Plan
Status

Active

Version

11.0 πŸ”₯

Component
CSSΒ  β†’

Last updated 11 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States luke.leber Pennsylvania

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024