[BUG]: Table sort headers can't be used from the keyboard and don't announce sort order

Open Beginner friendly
#419 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Simran-Sobhani is already working on this.

Since Oct 28, 2026.

  • #429 by @Simran-Sobhani — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, react

Research direction

Read SortTh in src/components/UI.jsx and check its use on the Repositories and Contributors pages. Add the proposed keyboard and sort state behavior, then cover it in src/components/UI.test.jsx with Testing Library. Done when sort headers can be used from the keyboard and expose the active sort order to screen readers.

Written by the indexing model from the issue text.

Description

bug enhancement
Bug Description

The sortable column headers on the Repositories and Contributors pages can only be used with a mouse.

SortTh in src/components/UI.jsx (lines 119-138) renders a plain <th> with an onClick handler. A <th> is not focusable, so Tab skips every sort header and there is no way to change the sort order from the keyboard. The header also has no aria-sort, so screen readers do not announce which column is sorted or in which direction. The only hint is the chevron icon and the accent color.

This affects 5 headers on /contributors (ContributorsPage.jsx lines 321-325) and every column on /repositories (RepositoriesPage.jsx line 253). Open PR #276 adds 4 more on a new Maintainers page through the same component.

Impact

Low - Minor inconvenience

Proposed Solution

A small change in SortTh only, so both pages get it:

  • Put a <button type="button"> inside the <th> and move the onClick to it, so the header is focusable and Enter/Space work.
  • Set aria-sort="ascending" / "descending" on the active <th> and "none" on the others.
  • Mark the chevron icon aria-hidden="true".
  • Add src/components/UI.test.jsx with Testing Library: the header is a button, clicking it calls onSort with the key, and aria-sort follows sortConfig.
Steps to Reproduce
  1. Explore any org, for example AOSSIE-Org, and open the Repositories page.
  2. Press Tab repeatedly from the search box.
  3. Focus never lands on a column header, and Enter or Space can't change the sort.
  4. With a screen reader on, move to a header: it is read as plain text with no sorted state.
Logs and Screenshots

No response

Environment Details
  • Branch: main (b396d1b)
  • Found by reading the code; any browser

I'd like to work on this if it's okay with the maintainers.

Code of Conduct
  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates
Dominant language
JavaScript
Stars
53
Forks
187
Avg merge
18m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AOSSIE-Org/OrgExplorer

All issues in AOSSIE-Org/OrgExplorer

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.