mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 05:42:19 +00:00
Wait for content the page owns before scanning it
Several accessibility scans ran against a page that had not finished arriving, so axe reported violations the app does not have. The worst of them was the medications case, which waited for a level-one heading and then checked that a level-one heading exists. A page that really lost its heading would have waited out the timeout under a misleading name instead of failing the rule, which makes it a check that cannot fail rather than a flaky one. The filter rail was the other bad sentinel. It renders beside the loading silhouettes rather than after them, so it was on screen while the rows were still grey rectangles. Under an 8x CPU throttle the rail and the loading marker resolved in the same 40ms poll and the rows a poll later. Every case now gates on a marker the real component carries in its resolved, non-empty branch, and on a component other than the one the scan asserts. Both the desktop table and the mobile card list carry the same marker so the wait holds at any viewport. No sentinel names a heading, the app frame, a busy marker or the filter rail any more.
This commit is contained in:
1 parent
210380f46d
commit
47e50ece39
10 files changed
+153
-31
No files matched your search
@@ -184,7 +184,10 @@ export function LabList({ onAddFirst }: { onAddFirst?: () => void } = {}) {
|
||||
// (#40); the card/tile view is the alternative the settings toggle selects.
|
||||
if (prefs.view === "list") {
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
// `lab-list` marks the read results in both view shapes. The loading
|
||||
// branch above carries `lab-list-loading` instead, so the marker
|
||||
// cannot stand for a silhouette.
|
||||
<div data-slot="lab-list" className="space-y-3">
|
||||
{truncated ? (
|
||||
<p className="text-muted-foreground text-xs">
|
||||
{t("labs.showingLatestOf", { shown, total })}
|
||||
@@ -259,6 +262,7 @@ export function LabList({ onAddFirst }: { onAddFirst?: () => void } = {}) {
|
||||
// control on the tile; the trash icon lives only on the value detail view.
|
||||
return (
|
||||
<ul
|
||||
data-slot="lab-list"
|
||||
className={cn(
|
||||
"grid list-none gap-4 p-0",
|
||||
// A lone lab spans the full row rather than orphaning half of it;
|
||||
|
||||
Reference in new issue
Block a user