-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Feature Description
Summary
Introduce a public DI token to allow apps to replace the default mat-sort-header arrow with app-provided icons/templates in a themable, accessible, and opt-in way.
API (names only)
Token: MAT_SORT_HEADER_ICONS
Config shape: MatSortHeaderIcons with optional keys default, ascending, descending (accepts TemplateRef or sanitized SVG/string)
Use Case

Rationale
Avoids fragile hacks (CSS hiding + DOM mutation) and centralizes app-wide customization.
Keeps behavior backwards-compatible when token is not provided.
Theming
Encourage currentColor so icons follow app theme and runtime CSS variables.
Accessibility
Preserve aria-sort, keep icons decorative (aria-hidden="true"), document when non-decorative icons require additional labeling.
Compatibility
Token is opt-in; default behavior unchanged if not provided.
Reference
Material table styling guidelines: material.angular.dev/components/table/styling.