Hub: index · watch · videos · demo

Sortable tables: don’t hide the sort state

A sortable table is still a table: rows and columns with headers. The accessibility problem usually happens when we make the headers “clickable” by styling plain text — or by making the entire <th> behave like a button. That breaks keyboard access and hides the sort state from assistive technology.

Live demo (BEFORE vs AFTER): Open sortable tables demo

The fix (small, reliable pattern)

Gotchas worth avoiding

Rule of thumb

If the user can’t (1) reach the header control with Tab, (2) sort using Enter/Space, and (3) understand the current sort order without seeing the screen — it’s not done yet.