openedx / openedx/paragon

[paragon-openedx.netlify.app] Feedback (on /components/datatable/)

Open
#2,998 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

a11y bug docs
Dominant language
JavaScript
Stars
140
Forks
100
Avg merge
1h 3m
Merged PRs (30d)
30

Description

Bugs

I believe there may be an a11y/usability bug surrounding sortable columns in the DataTable component regarding the title attribute value on sortable column headers. As is, every sortable column header has the same title attribute of "Toggle SortBy".

There are two primary issues with this:

  1. title is the same value across all column headers.
  2. title does not include any mention of the actual column header.
image

The current value of these title attributes on sortable column headers is coming from @tanstack/react-query's getSortByToggleProps called within TableHeaderCell.

It's not entirely clear whether we can deduce a user-friendly string version of the column header name (e.g., based on render('Header)), or whether DataTable can support custom title attribute values for each column for more granular control by consumers.

### Tasks
- [ ] Ensure each sortable column header has a unique `title` attribute, including the column header text to be more descriptive than just "Toggle SortBy" across all sortable column headers.

Contributor guide

Open the contributing guide

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.

Research direction

Start by tracing the DataTable component to TableHeaderCell and the getSortByToggleProps call that supplies sortable header titles. Determine whether the column header text can be used or whether consumers need custom title values; done means each sortable header has a unique, descriptive title including its column text, with the existing component behavior covered as appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
accessibility, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.