Performance: Close button component
MEDIUM IMPACT
This affects page load speed and interaction responsiveness by how the close button is implemented and styled.
<button type="button" class="btn-close" aria-label="Close" onclick="closeModal()"></button>
<div onclick="closeModal()" style="cursor:pointer; font-size: 24px;">×</div>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| <div> with inline styles and onclick | Minimal but non-semantic | Triggers reflow on style changes | Moderate due to inline styles | [X] Bad |
| <button> with Bootstrap btn-close class | Minimal and semantic | Single reflow on interaction | Low due to optimized CSS | [OK] Good |