Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/components/course/course-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,12 @@ export const CourseCard = memo(function CourseCard({

{/* Progress bar with percentage label */}
{enrolled && progress !== undefined && (
<div className="w-full space-y-1 animate-in fade-in slide-in-from-top-2 duration-300">
<div className="flex items-center justify-between">
<div
className="w-full space-y-1 animate-in fade-in slide-in-from-top-2 duration-300"
role="region"
aria-label={`Course progress: ${Math.round(progress)}%`}
>
<div className="flex items-center justify-between" aria-hidden="true">
<span className="text-xs font-medium text-gray-600 dark:text-gray-400">
Progress
</span>
Expand Down
10 changes: 5 additions & 5 deletions src/components/course/module-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ export function ModuleList({
const content = (
<>
{/* Status icon */}
<div className="flex-shrink-0">
<div className="flex-shrink-0" role="status" aria-label={isCompleted ? "Completed module" : isCurrent ? "Current module in progress" : isAccessible ? "Module not started" : "Locked module"}>
{isCompleted ? (
<CheckCircle className="h-5 w-5 text-green-500" aria-label="Completed" />
<CheckCircle className="h-5 w-5 text-green-500" aria-hidden="true" />
) : isCurrent ? (
<PlayCircle className="h-5 w-5 text-primary-500" aria-label="In progress" />
<PlayCircle className="h-5 w-5 text-primary-500" aria-hidden="true" />
) : isAccessible ? (
<Circle className="h-5 w-5 text-gray-300 dark:text-gray-600" aria-label="Not started" />
<Circle className="h-5 w-5 text-gray-300 dark:text-gray-600" aria-hidden="true" />
) : (
<Lock className="h-5 w-5 text-gray-300 dark:text-gray-600" aria-label="Locked" />
<Lock className="h-5 w-5 text-gray-300 dark:text-gray-600" aria-hidden="true" />
)}
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/components/course/quiz-interface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export function QuizInterface({ quiz, courseId, onSubmit, onRetry, className }:

<CardContent className="space-y-6 p-4 sm:p-6 pt-2 sm:pt-2">
{/* Question counter + text */}
<div>
<div aria-live="polite">
<p className="text-xs font-medium text-gray-400 dark:text-gray-500 mb-2 uppercase tracking-wide">
Question {currentIndex + 1} of {questions.length}
</p>
Expand Down
2 changes: 1 addition & 1 deletion src/components/course/results-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function ResultsScreen({
</div>

{/* Heading */}
<h2 className="text-2xl font-bold text-gray-900 dark:text-gray-100">
<h2 className="text-2xl font-bold text-gray-900 dark:text-gray-100" aria-live="assertive">
{attempt.passed ? "Well done!" : "Keep going!"}
</h2>
<p className="text-sm text-gray-500 dark:text-gray-400 mt-1">
Expand Down