Performance: Linking to sections using IDs
LOW IMPACT
This affects page load speed slightly by enabling quick navigation and impacts visual stability during jumps.
<a href="#section1" aria-label="Go to Section 1">Go to Section 1</a> ... <section id="section1" style="min-height: 20rem;">Content</section>
<a href="#section1">Go to Section 1</a> ... <section id="section1">Content</section>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Linking to ID without reserved space | Minimal | Multiple if content resizes after scroll | Medium due to repaint after shift | [X] Bad |
| Linking to ID with reserved space | Minimal | Single reflow on load | Low paint cost | [OK] Good |