diff --git a/frontend/src/components/AMMComponents.tsx b/frontend/src/components/AMMComponents.tsx index ab6156cb..08199dd7 100644 --- a/frontend/src/components/AMMComponents.tsx +++ b/frontend/src/components/AMMComponents.tsx @@ -15,7 +15,11 @@ export function AMMPoolCard({ poolId, onSelect }: PoolCardProps) { if (!pool) return
| handleSort('timestamp')} className="sortable"> + | handleSort('timestamp')} + onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); handleSort('timestamp'); } }} + className="sortable" + tabIndex={0} + role="columnheader" + aria-sort={sortBy === 'timestamp' ? (sortOrder === 'asc' ? 'ascending' : 'descending') : 'none'} + > Timestamp {sortBy === 'timestamp' && (sortOrder === 'asc' ? '↑' : '↓')} | User ID | -handleSort('action')} className="sortable"> + | handleSort('action')} + onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); handleSort('action'); } }} + className="sortable" + tabIndex={0} + role="columnheader" + aria-sort={sortBy === 'action' ? (sortOrder === 'asc' ? 'ascending' : 'descending') : 'none'} + > Action {sortBy === 'action' && (sortOrder === 'asc' ? '↑' : '↓')} | Resource | Resource ID | -handleSort('status')} className="sortable"> + | handleSort('status')} + onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); handleSort('status'); } }} + className="sortable" + tabIndex={0} + role="columnheader" + aria-sort={sortBy === 'status' ? (sortOrder === 'asc' ? 'ascending' : 'descending') : 'none'} + > Status {sortBy === 'status' && (sortOrder === 'asc' ? '↑' : '↓')} | Details | diff --git a/frontend/src/components/ChartLegend.tsx b/frontend/src/components/ChartLegend.tsx index a896ae99..45255e55 100644 --- a/frontend/src/components/ChartLegend.tsx +++ b/frontend/src/components/ChartLegend.tsx @@ -61,6 +61,10 @@ export function TechnicalIndicatorLegend({ key={indicator.name} className="indicator-item" onClick={() => onToggleIndicator?.(indicator.name)} + onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onToggleIndicator?.(indicator.name); } }} + role="button" + tabIndex={onToggleIndicator ? 0 : undefined} + aria-label={`Toggle indicator ${indicator.name}`} >
|---|