-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.cursorrules
More file actions
73 lines (56 loc) · 3.01 KB
/
Copy path.cursorrules
File metadata and controls
73 lines (56 loc) · 3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Accessibility: WCAG 2.1 AA Compliance (Brown University Policy)
All HTML output from this project must comply with WCAG 2.1 AA.
Brown University requires full digital accessibility compliance by May 2026.
Reference: https://digital-accessibility.brown.edu/
## Known Issues to Fix
### CRITICAL: Publications page heading hierarchy
Every publication title is rendered as <h1>. There must be exactly ONE <h1> per page
("Publications"). Year headings should be <h2>. Paper titles should be <h3>.
### Research page heading skip
Page jumps from <h1>Research</h1> directly to <h3> for research themes.
Add <h2> section headers (e.g., "Research Themes") or change themes to <h2>.
### Footer heading levels
Footer uses <h3> then <h4> which may not follow the page's heading flow.
Consider using styled <div> or <span> elements instead of heading tags in the
footer, since the <nav aria-label="..."> landmarks already convey structure.
## Mandatory Checks for Every Change
### Headings
- Single <h1> per page/route
- Headings nest logically: h1 > h2 > h3, never skip levels
- Publication titles are NEVER <h1> — use <h3> under year <h2> headings
### Structure
- Landmark elements present: <header>, <nav>, <main>, <footer>
- All <nav> elements have aria-label to distinguish them
- Skip-to-content link is the first focusable element
- lang="en-US" on <html> element
### Images & Media
- Every <img> has alt text (descriptive for meaningful, alt="" for decorative)
- Decorative images also get aria-hidden="true"
- No auto-playing audio or video without user controls
- <iframe> elements (embedded videos) must have a title attribute
### Color & Contrast
- Text-to-background contrast ratio >= 4.5:1 (>= 3:1 for large text)
- Information is never conveyed by color alone
### Interactive Elements
- All interactive elements reachable via keyboard
- Visible :focus-visible styles on all focusable elements
- Icon-only buttons/links have aria-label or visually-hidden text
### Links
- Link text is descriptive (no bare "click here")
- External links indicate this via aria-label (e.g., "opens in new tab")
### SPA Behavior
- Route changes update document.title
- Route changes announce new content via aria-live region
- Focus moves to new content heading after navigation
### PDFs
- Do not host local PDFs unless they are tagged (PDF/UA compliant)
- Prefer linking to publisher DOI for publications
- Any locally hosted PDF must have title, author, and lang metadata
## Testing
- Run Lighthouse accessibility audit before each deploy
- Test keyboard navigation (Tab, Shift+Tab, Enter, Escape)
## Publications data
- **Source of truth:** `~/Work/personal/cv/data/publications_structured.json` (not this repo’s JSON by hand).
- **Style:** `~/Work/personal/cv/memory/procedures/publication-style.md` — sentence-case titles, author lines; never arXiv title case.
- **Sync:** `python3 scripts/sync_from_central_publications.py` after central file edits.
- **Home highlights:** `src/pages/Home/Home.tsx` cards are manual; update journal/year labels when featuring a paper.