Sort Direction and Priority Indicators
Sorted headers show a direction icon. In multi-sort mode, a numeric priority badge shows each column's position in the sort order. Developers can customise the icons, the placement of the badge, and whether the badge appears when only one column is sorted. The indicators also have accessible text so screen readers do not rely on the icons.
Planned. This page shows the specification from issue #186. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
A grid with a three-column multi-sort applied: Department asc, Salary desc, Name asc.
Expected behavior
Each sorted header shows its direction icon and priority number 1 to 3. When the sort is reduced to one column, the badge disappears unless showWhenSingle is on. Unsorted headers show a faint neutral icon when showUnsortedIcon is enabled.
Planned API surface
icons.sortAscendingicons.sortDescendingicons.sortUnsortedshowUnsortedIconsortPriorityBadgesortPriorityBadge.showWhenSingleheaderComponent sort slotCSS variables --war-sort-indicator-*Acceptance criteria
- The badge number equals the column's index in sortModel plus 1 (pending)
- With showWhenSingle=false, no badge is rendered when sortModel has exactly one entry (pending)
- Custom icons replace the default icons without changing the header layout (pending)
- Indicator elements are aria-hidden, and equivalent text is exposed through the header's accessible description (pending)
- Indicators update in the same frame that sortModel changes (pending)