From 0ea5d0d0bd87f0d0ba6c5948424c6c35d88884a1 Mon Sep 17 00:00:00 2001 From: faveteamz Date: Mon, 1 Jun 2026 12:16:04 +0000 Subject: [PATCH] feat: add ARIA labels to all interactive elements (#279) - Add label/htmlFor associations and aria-describedby on all form inputs - Add role=alert and aria-live regions for error/status messages - Add aria-label to icon-only and wallet connect/disconnect buttons - Add role=article + aria-label to NFTCard - Add role=status + aria-label to VerificationBadge - Add aria-busy to submit buttons during loading --- frontend/src/components/NFTCard.jsx | 5 ++++- frontend/src/components/VerificationBadge.jsx | 8 +++++++- frontend/src/pages/IssuerDashboard.jsx | 13 ++++++++----- frontend/src/pages/Landing.jsx | 5 +++-- frontend/src/pages/PatientDashboard.jsx | 8 ++++---- frontend/src/pages/VerifyPage.jsx | 15 ++++++++++----- 6 files changed, 36 insertions(+), 18 deletions(-) diff --git a/frontend/src/components/NFTCard.jsx b/frontend/src/components/NFTCard.jsx index c8b64ff..25a45b5 100644 --- a/frontend/src/components/NFTCard.jsx +++ b/frontend/src/components/NFTCard.jsx @@ -1,6 +1,9 @@ export default function NFTCard({ record }) { return ( -

Issue Vaccination NFT

-
+ {[ { key: 'patient_address', label: 'Patient Stellar Address', placeholder: 'G...' }, { key: 'vaccine_name', label: 'Vaccine Name', placeholder: 'e.g. COVID-19' }, { key: 'date_administered', label: 'Date Administered', placeholder: 'YYYY-MM-DD' }, ].map(({ key, label, placeholder }) => (
-

{label}

+ setForm((f) => ({ ...f, [key]: e.target.value }))} + aria-describedby={error ? 'issuer-error' : undefined} required />
))} -
- {error &&

Error: {error}

} - {success &&

✅ {success}

} + {error && } + {success &&

✅ {success}

}
); } diff --git a/frontend/src/pages/Landing.jsx b/frontend/src/pages/Landing.jsx index 05b46e5..df06e2b 100644 --- a/frontend/src/pages/Landing.jsx +++ b/frontend/src/pages/Landing.jsx @@ -22,12 +22,13 @@ export default function Landing() {

✅ Connected: {publicKey.slice(0, 8)}…{publicKey.slice(-4)}

- ) : ( - )} diff --git a/frontend/src/pages/PatientDashboard.jsx b/frontend/src/pages/PatientDashboard.jsx index 193a6ad..2306b9c 100644 --- a/frontend/src/pages/PatientDashboard.jsx +++ b/frontend/src/pages/PatientDashboard.jsx @@ -25,7 +25,7 @@ export default function PatientDashboard() { return (

Connect your wallet to view records.

- +
); } @@ -36,10 +36,10 @@ export default function PatientDashboard() {

Wallet: {publicKey}

- {loading &&

Loading…

} - {error &&

Error: {error}

} + {loading &&

Loading…

} + {error &&

Error: {error}

} {!loading && records.length === 0 && ( -

No vaccination records found.

+

No vaccination records found.

)} {records.map((r) => )} diff --git a/frontend/src/pages/VerifyPage.jsx b/frontend/src/pages/VerifyPage.jsx index 9043f0b..52e3459 100644 --- a/frontend/src/pages/VerifyPage.jsx +++ b/frontend/src/pages/VerifyPage.jsx @@ -34,23 +34,28 @@ export default function VerifyPage() { return (

Verify Vaccination Status

-
+ + setWallet(e.target.value)} + aria-describedby={error ? 'verify-error' : undefined} required /> -
- {error &&

Error: {error}

} + {error && } {result && ( -
+
{result.records?.map((r) => )}