feat(ContractEventFeed): announce Export JSON count to screen readers, document fromLedger (#341) - #387
Open
oladev2026-tech wants to merge 1 commit into
Conversation
…readers, document fromLedger (Sorokit#341) Issue Sorokit#341 lists three gaps that are already implemented in source and covered by the existing Sorokit#352 test suite (JSON export Sorokit#352, topic copy Sorokit#352, fromLedger Sorokit#352): - `JSON.stringify(events, null, 2)` is already wired to an Export JSON button in the header. - Each `TopicTag` already has a hover-reveal copy button that calls `navigator.clipboard.writeText(topic)`. - `fromLedger?: number` is already plumbed through to `getClient().soroban.getEvents(contractId, limit, fromLedger)`. This commit makes two small refinements on top: 1. The Export JSON button now exposes an `aria-label` that announces the exact number of events about to be downloaded (`Export 3 events as JSON`). Screen readers were otherwise reading the tooltip-only `title=\"Export JSON\"` which is content-bearing but not role-compliant. The same button text on the surface stays `Export JSON` so the visual UI does not regress. 2. The `fromLedger` prop on `ContractEventFeedProps` now has a proper JSDoc explaining the two modes: omitted (\"latest from the network\") vs set (\"page historical events starting at this ledger\"), which was previously documented only by the type system. No tests updated / no tests removed. The existing Sorokit#352 test suite already verifies the three flags in Sorokit#341\u2019s title. Closes Sorokit#341
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Issue #341 lists three gaps (JSON export, topic copy,
fromLedgerprop) that are already implemented insrc/components/ContractEventFeed.tsxand covered by the existing #352 test suite (describe("JSON export (#352)", "topic copy (#352)", "fromLedger prop (#352)").This commit layers two refinements on top:
aria-label: the trigger button now reads"Export N events as JSON"for screen readers, where N is the current event count. The visual button label staysExport JSON. The hovertitleis unchanged. This makes the button content self-describing without introducing a UX regression.fromLedgerJSDoc: the prop now has documentation describing the two modes (omitted = latest from network, set = page historical events from a chosen ledger). The previous type-only hint left consumers without context for when to use which mode.Notes
describe("JSON export (#352)"),describe("topic copy (#352)"), anddescribe("fromLedger prop (#352)")blocks already exercise the three features called out in the issue title.Tab → Enteron the Export JSON button) is unchanged.Closes #341