You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(material/sort): add description input for sort-header (#23633)
Adds a description input for mat-sort-header so that developers can provide an accessible description (using AriaDescirber under the hood). Additionally update the accessibility section for the sort header's documentation with guidance on providing an accessible experience.
I decided to use this approach instead of expanding `MatSortHeaderIntl` because the message developers would want to set here depends on several bits of information, including:
* Whether the column is currently sorted
* The sort direction
* Whether users can clear sorting (configured on `MatSort`)
* The name of the column (not the ID)
Accounting for all of these factors would have made the intl formatting too complicated.
This does have the negative consequence of needing to set a description for every header. However, users can add a custom directive to set the description in a consistent way if they have an application with many tables.
(cherry picked from commit ecd54f4)
0 commit comments