diff --git a/src/components/nostr/kinds/BaseEventRenderer.tsx b/src/components/nostr/kinds/BaseEventRenderer.tsx index 7b1224d..f7780ad 100644 --- a/src/components/nostr/kinds/BaseEventRenderer.tsx +++ b/src/components/nostr/kinds/BaseEventRenderer.tsx @@ -1,4 +1,4 @@ -import { useState, useEffect } from "react"; +import { useState, useEffect, useMemo, useCallback } from "react"; import { NostrEvent } from "@/types/nostr"; import { UserName } from "../UserName"; import { KindBadge } from "@/components/KindBadge"; @@ -126,6 +126,7 @@ function formatRelayUrlForDisplay(url: string): string { /** * RelayPublishItem - Clickable relay item for republish submenu + * Shows relay info (icon, name, URL) with publish status */ function RelayPublishItem({ url, @@ -141,13 +142,22 @@ function RelayPublishItem({ const relayInfo = useRelayInfo(url); const displayUrl = formatRelayUrlForDisplay(url); + // Determine button label for accessibility + const ariaLabel = isPublished + ? `${displayUrl} - Already published` + : isPublishing + ? `${displayUrl} - Publishing...` + : `Publish event to ${displayUrl}`; + return ( ) : ( -
+ )}