fix: add aria-sort semantics and live announcements to transactions sort (Closes #731) - #1148
Open
waterWang wants to merge 1 commit into
Open
fix: add aria-sort semantics and live announcements to transactions sort (Closes #731)#1148waterWang wants to merge 1 commit into
waterWang wants to merge 1 commit into
Conversation
…ort (Closes Stellopay#731) - Add aria-sort attributes (ascending/descending/none) on the Date, Amount, and Status column headers based on the active sort config - Add a visually-hidden aria-live=polite region that announces the current sort order to screen readers when it changes - Improve the sort trigger button aria-label to include the active sort description - Add tests for aria-live announcement, aria-label sort info, and aria-sort on table headers - Fix pre-existing JSX parse error in TableHead function (adjacent elements without wrapper)
Contributor
|
@waterWang is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Description
Fixes #731 — Add
aria-sortsemantics and screen-reader sort announcements tocomponents/transactions/sort.tsx.Changes
sort.tsx(SortControl)aria-live="polite"region that announces the current sort order to screen readers when the user changes itaria-labelto include the active sort description (e.g., "Sort transactions. Sorted by Date descending, then by Amount ascending.")renderSortDescription()helper to build human-readable descriptions from sort configstransactions-table.tsxsortConfigsprop toTransactionsTablePropsExtendedgetAriaSort()helper to map sort configs toaria-sortvaluesaria-sort="ascending"/"descending"/"none"on the Date, Amount, and Status column headersTableHeadfunction was returning two adjacent elements (<th>...</th>followed by a<>...</>fragment) without a wrapper — added proper closing);andreturn (to separate the helper function from the component's rendertransactions-content.tsxsortConfigstoTransactionsTablecomponentTesting
sort.test.tsx— 15 tests passing (added 4 new tests for aria-live region, aria-label with sort info, multi-column announcement, and empty sort announcement)transactions-table.test.tsx— Added 4 new tests for aria-sort behavior on column headersWCAG 2.1 AA Compliance
aria-sorton sortable column headers (Date, Amount, Status)aria-live="polite"announcements for sort changesaria-atomic="true"ensures the full announcement is readrole="status"on the live region for correct screen reader behavioraria-labelincluding current sort state