Skip to content

Commit e4ee116

Browse files
fix(a11y): promote teacher page headings from h2 to h1
Dashboard, Courses, and Templates pages all used <h2> as their top-level heading with no <h1> above them, breaking document outline and SEO. Styling is unchanged (same Tailwind classes). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 09cbd8e commit e4ee116

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

app/[locale]/dashboard/teacher/courses/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ export default async function TeacherCoursesPage() {
5050
<div className="flex-1 space-y-6 p-6 lg:p-8" data-testid="teacher-courses-list">
5151
<div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
5252
<div>
53-
<h2 className="text-2xl font-bold tracking-tight text-foreground">
53+
<h1 className="text-2xl font-bold tracking-tight text-foreground">
5454
{t('title')}
55-
</h2>
55+
</h1>
5656
<p className="text-sm text-muted-foreground mt-0.5">
5757
{t('description')}
5858
</p>

app/[locale]/dashboard/teacher/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ export default async function TeacherDashboard() {
113113

114114
<div data-tour="teacher-welcome" className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
115115
<div>
116-
<h2 className="text-2xl font-bold tracking-tight text-foreground" data-testid="teacher-welcome">
116+
<h1 className="text-2xl font-bold tracking-tight text-foreground" data-testid="teacher-welcome">
117117
{t.rich('welcome', {
118118
userName: profile?.full_name?.split(' ')[0] || t('defaultName')
119119
})}
120-
</h2>
120+
</h1>
121121
<p className="text-sm text-muted-foreground mt-0.5">
122122
{t('subtitle')}
123123
</p>

app/[locale]/dashboard/teacher/templates/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default function PromptTemplatesPage() {
122122
<div className="flex-1 space-y-6 p-6 lg:p-8" data-testid="templates-page">
123123
<div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
124124
<div>
125-
<h2 className="text-2xl font-bold tracking-tight">{t('title')}</h2>
125+
<h1 className="text-2xl font-bold tracking-tight">{t('title')}</h1>
126126
<p className="text-sm text-muted-foreground mt-0.5">
127127
{t('description')}
128128
</p>

0 commit comments

Comments
 (0)