Files
bible/rules/patterns/table-management/density/README.md
T

482 B

Sortable header with header semantics

<th scope="col" aria-sort="ascending">
  <button type="button" data-sort-key="quantity">
    Quantity <span aria-hidden="true">↑</span>
  </button>
</th>

On each activation cycle ascending → descending → original order; update the arrow and aria-sort, remove sort state from other columns, and request the sorted query. Do not replace the th role with button. Native button semantics provide Enter/Space activation.