>
>
Learn More
```
---
## 8. Loading Screen Accessibility
```javascript
// Announce loading state to screen readers
function announceLoading() {
const announcement = document.createElement('div');
announcement.setAttribute('role', 'status');
announcement.setAttribute('aria-live', 'polite');
announcement.setAttribute('aria-label', 'Page loading');
announcement.className = 'sr-only'; // visually hidden
document.body.appendChild(announcement);
// Update announcement when done
window.addEventListener('load', () => {
announcement.textContent = 'Page loaded';
setTimeout(() => announcement.remove(), 1000);
});
}
```
```css
/* Screen-reader only utility class */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0,0,0,0);
white-space: nowrap;
border: 0;
}
```
---
## WCAG 2.1 AA Compliance Checklist
Before shipping any 2.5D website:
- [ ] `prefers-reduced-motion` CSS block present and tested
- [ ] GSAP animations stopped when reduced motion detected
- [ ] All decorative elements have `aria-hidden="true"`
- [ ] All meaningful images have descriptive alt text
- [ ] SplitText elements have `aria-label` on parent
- [ ] Heading hierarchy is logical (h1 → h2 → h3, no skipping)
- [ ] All interactive elements reachable via keyboard Tab
- [ ] Focus indicators visible and have 3:1 contrast
- [ ] Skip-to-main-content link present
- [ ] Text contrast meets 4.5:1 minimum
- [ ] CTA buttons have descriptive text
- [ ] Motion toggle button provided (optional but recommended)
- [ ] Page has `` (or correct language)
- [ ] `