fix(ui): add dynamic aria-valuenow, refine focus-visible styles
This commit is contained in:
1 parent
441a6a857e
commit
7b19b5b41a
3 files changed
+13
-3
No files matched your search
@@ -222,8 +222,10 @@ def api_job_frame(job_id):
|
||||
job = job_queue.get_job(job_id)
|
||||
if job is None:
|
||||
return "Job not found", 404
|
||||
# latest_frame is not set yet (Task 5 adds it) — return 404 for now
|
||||
if job.latest_frame is None:
|
||||
return "No frame available", 404
|
||||
from flask import Response
|
||||
return Response(job.latest_frame, mimetype="image/jpeg")
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -270,6 +270,10 @@ function initStatusPage(jobId, initialStatus) {
|
||||
var pct = Math.min(100, Math.max(0, Math.round(progress * 100)));
|
||||
progressFill.style.width = pct + '%';
|
||||
if (progressPct) progressPct.textContent = pct + '%';
|
||||
var progressBar = progressFill.parentElement;
|
||||
if (progressBar && progressBar.getAttribute('role') === 'progressbar') {
|
||||
progressBar.setAttribute('aria-valuenow', pct);
|
||||
}
|
||||
}
|
||||
|
||||
/* --- Update status badge --- */
|
||||
|
||||
+6
-2
@@ -182,7 +182,7 @@ table {
|
||||
}
|
||||
|
||||
:focus-visible {
|
||||
outline: 2px solid var(--color-primary);
|
||||
outline: 2px solid var(--color-primary-500);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ main {
|
||||
}
|
||||
|
||||
.btn:focus-visible {
|
||||
outline: 2px solid var(--color-primary);
|
||||
outline: 2px solid var(--color-primary-500);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@@ -914,6 +914,10 @@ main {
|
||||
.skip-link:focus {
|
||||
outline-color: var(--color-primary-600);
|
||||
}
|
||||
|
||||
:focus-visible {
|
||||
outline-color: var(--color-primary-500);
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------- Print ---------- */
|
||||
|
||||
Reference in new issue
Block a user