fix(#240): accessibility, color consistency, and reviewedPct denominator
- TranscriptionColumn progress bar: add aria-hidden="true" (the block count text above already communicates the value to screen readers) - TranscriptionColumn weekly pulse: text-ink → text-ink-2 (matches SegmentationColumn, same semantic element) - ReadyColumn reviewedPct: align denominator to annotationCount so the displayed percentage matches the SQL threshold used to classify "ready" - page.svelte.spec.ts: add missing segmentationDocs/transcriptionDocs/ readyDocs/weeklyStats to emptyData fixture Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,8 +27,8 @@ function formatDate(dateStr: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function reviewedPct(doc: TranscriptionQueueItemDTO): number {
|
function reviewedPct(doc: TranscriptionQueueItemDTO): number {
|
||||||
if (doc.textedBlockCount === 0) return 0;
|
if (doc.annotationCount === 0) return 0;
|
||||||
return Math.round((doc.reviewedBlockCount / doc.textedBlockCount) * 100);
|
return Math.round((doc.reviewedBlockCount / doc.annotationCount) * 100);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ function blockProgress(doc: TranscriptionQueueItemDTO): number {
|
|||||||
{m.mission_control_trans_skill_pill()}
|
{m.mission_control_trans_skill_pill()}
|
||||||
</span>
|
</span>
|
||||||
{#if weeklyCount > 0}
|
{#if weeklyCount > 0}
|
||||||
<p class="mt-1 text-xs font-semibold text-ink">
|
<p class="mt-1 text-xs font-semibold text-ink-2">
|
||||||
{m.mission_control_weekly_pulse({ count: weeklyCount })}
|
{m.mission_control_weekly_pulse({ count: weeklyCount })}
|
||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -68,7 +68,7 @@ function blockProgress(doc: TranscriptionQueueItemDTO): number {
|
|||||||
total: doc.annotationCount
|
total: doc.annotationCount
|
||||||
})}
|
})}
|
||||||
</span>
|
</span>
|
||||||
<div class="h-1 flex-1 overflow-hidden rounded-full bg-ink/20">
|
<div class="h-1 flex-1 overflow-hidden rounded-full bg-ink/20" aria-hidden="true">
|
||||||
<div
|
<div
|
||||||
class="h-full rounded-full bg-ink transition-all"
|
class="h-full rounded-full bg-ink transition-all"
|
||||||
style="width: {blockProgress(doc).toFixed(0)}%"
|
style="width: {blockProgress(doc).toFixed(0)}%"
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ const emptyData = {
|
|||||||
stats: null,
|
stats: null,
|
||||||
incompleteCount: 0,
|
incompleteCount: 0,
|
||||||
initialValues: { senderName: '', receiverName: '' },
|
initialValues: { senderName: '', receiverName: '' },
|
||||||
|
segmentationDocs: [],
|
||||||
|
transcriptionDocs: [],
|
||||||
|
readyDocs: [],
|
||||||
|
weeklyStats: null,
|
||||||
error: null
|
error: null
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user