From 816e8f218b1d510facb2478d9a2e7ec75fcf6681 Mon Sep 17 00:00:00 2001 From: JoyLight00 Date: Tue, 30 Jun 2026 18:33:30 +0100 Subject: [PATCH] fix: address accessibility issues for issues #52, #69, #75, #72 #52 Internationalize AddressChip control labels - Add useTranslations hook to AddressChip component - Replace hardcoded 'Copied' and 'Copy' strings with localized Common.copyAddress and Common.copied - Replace hardcoded 'View on Stellar Expert' with localized Common.viewOnExplorer #69 Associate labels with OracleForms select - Add aria-label prop to Select component for accessible name - Pass label to Select from Field wrapper for project dropdowns #75 Replace placeholder anchor links on landing counters - Remove href='#' from StatBlock in Landing.tsx - Counters now render as plain figures until real links are wired #72 Make footer trust links real or mark them clearly - Convert non-functional buttons to anchor links pointing to /verify, /risk, /learn, /talk - Add nav element with aria-label for trust links section --- messages/en.json | 8 ++++ messages/fr.json | 6 +++ src/components/AddressChip.tsx | 8 +++- src/screens/Landing.tsx | 18 ++------ src/screens/admin/OracleForms.tsx | 15 ++++-- src/shell/Footer.tsx | 77 ++++++++++++++++++++++--------- 6 files changed, 91 insertions(+), 41 deletions(-) diff --git a/messages/en.json b/messages/en.json index 433c62a..546d677 100644 --- a/messages/en.json +++ b/messages/en.json @@ -1,4 +1,9 @@ { + "Common": { + "copyAddress": "Copy {label}", + "copied": "Copied", + "viewOnExplorer": "View {label} on Stellar Expert" + }, "Nav": { "explore": "Explore", "how": "How it works", @@ -19,6 +24,7 @@ "demoSession": "Demo session" }, "Footer": { + "trustLinks": "Trust links", "verify": "Verify everything", "risk": "Risk disclosure", "learn": "Learn", @@ -235,6 +241,8 @@ "actionSave": "Save" }, "Creator": { + "title": "Creator space", + "description": "Apply for the whitelist, build your project page, and watch the pool fund it. The oracle scores your credit quality and green impact, and we show you exactly what moves them.", "h1": "Creator space", "subtitle": "Apply for the whitelist, build your project page, and watch the pool fund it. The oracle scores your credit quality and green impact, and we show you exactly what moves them.", "tabApply": "Apply", diff --git a/messages/fr.json b/messages/fr.json index 0752b1f..0d92972 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -1,4 +1,9 @@ { + "Common": { + "copyAddress": "Copier {label}", + "copied": "Copié", + "viewOnExplorer": "Voir {label} sur Stellar Expert" + }, "Nav": { "explore": "Explorer", "how": "Comment ça marche", @@ -19,6 +24,7 @@ "demoSession": "Session démo" }, "Footer": { + "trustLinks": "Liens de confiance", "verify": "Tout vérifier", "risk": "Avertissement sur les risques", "learn": "Comprendre", diff --git a/src/components/AddressChip.tsx b/src/components/AddressChip.tsx index 615a6ac..35245f5 100644 --- a/src/components/AddressChip.tsx +++ b/src/components/AddressChip.tsx @@ -1,4 +1,7 @@ +'use client' + import { useState, type CSSProperties } from 'react' +import { useTranslations } from 'next-intl' /** * Heliobond AddressChip — a Stellar address or tx hash, truncated in the @@ -22,6 +25,7 @@ export function AddressChip({ label = 'address', style, }: AddressChipProps) { + const t = useTranslations('Common') const [copied, setCopied] = useState(false) const [hover, setHover] = useState(false) @@ -66,7 +70,7 @@ export function AddressChip({ - ))} - + {t('admin')} - + )