From 8f0bad4133c0b44d22dba5cb8f3cfb1a38016df4 Mon Sep 17 00:00:00 2001 From: buinntalen Date: Mon, 29 Jun 2026 13:56:23 +0000 Subject: [PATCH] feat(a11y, interactivity, print, widgets): add accessibility, interactivity, and customization Resolves #396 Resolves #397 Resolves #398 Resolves #399 #396 - Fix Footer Link Accessibility: - Added aria-labels to icon links (website, GitHub) - Added visible focus indicators with ring styles - Wrapped link lists in semantic nav elements - Added skip to main content link for keyboard users - Tab through footer links with visible focus states #397 - Enhance HowItWorks Section Interactivity: - Auto-advancing steps every 5 seconds - Click to pause/explore functionality - Animated step transitions with scale and ring effects - Detail expansion on click - Progress indicator dots with clickable navigation - Keyboard support (Enter/Space to interact) #398 - Add InvoiceQRModal Print Option: - Added print button in invoice QR modal - Created print-friendly layout with clean styling - Includes QR code, invoice details, and payment link - Print dialog triggers automatically after generation #399 - Implement LPDashboard Custom Widgets: - Added widget visibility toggle functionality - Drag-and-drop widget reordering - Reset layout to default option - Widget state persists to localStorage per user - Customize Widgets button in dashboard controls - Widgets affected: Portfolio Summary, Analytics Chart, Yield Comparison, Risk Summary, Insurance Pool, Portfolio Table --- src/components/Footer.tsx | 55 ++++--- src/components/HowItWorks.tsx | 88 +++++++++++- src/components/InvoiceQRModal.tsx | 173 +++++++++++++++++++++-- src/components/LPDashboard.tsx | 167 +++++++++++++--------- src/components/LPWidgetLayoutManager.tsx | 117 +++++++++++++++ src/hooks/useLPWidgetLayout.ts | 118 ++++++++++++++++ 6 files changed, 615 insertions(+), 103 deletions(-) create mode 100644 src/components/LPWidgetLayoutManager.tsx create mode 100644 src/hooks/useLPWidgetLayout.ts diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index eeb11eb..ea0e09c 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -1,12 +1,29 @@ "use client"; import { useTranslation } from "react-i18next"; +import { useRef } from "react"; export default function Footer() { const { t } = useTranslation(); + const footerRef = useRef(null); + + const skipToMain = () => { + const mainContent = document.querySelector("main"); + if (mainContent) { + mainContent.focus(); + mainContent.scrollIntoView(); + } + }; return ( -