Documentation Feedback
I am currently working on accessibility (a11y) for tables and stumbled upon something that looks like a documentation leftover — MatSortHeaderIntl no longer allows any customization, yet it's still documented as the go-to solution.
The MatSortHeaderIntl class is still part of the API and documented as the way to customize sort header labels: "To modify the labels and text displayed, create a new instance of MatSortHeaderIntl and include it in a custom provider."
However, since the MDC migration (Angular 13), the class has no customizable string properties. The old sortButtonLabel was removed and never replaced, so extending this class literally does nothing.
In practice:
- The JSDoc comment is misleading — extending
MatSortHeaderIntl customizes nothing
- Users wanting to provide accessible sort descriptions must use the
sortActionDescription input per column instead
Shouldn't MatSortHeaderIntl itself be deprecated with guidance to use sortActionDescription instead?
cheers!
Affected documentation page
https://next.material.angular.dev/components/sort/api#MatSortHeaderIntl
Documentation Feedback
I am currently working on accessibility (a11y) for tables and stumbled upon something that looks like a documentation leftover —
MatSortHeaderIntlno longer allows any customization, yet it's still documented as the go-to solution.The
MatSortHeaderIntlclass is still part of the API and documented as the way to customize sort header labels: "To modify the labels and text displayed, create a new instance of MatSortHeaderIntl and include it in a custom provider."However, since the MDC migration (Angular 13), the class has no customizable string properties. The old
sortButtonLabelwas removed and never replaced, so extending this class literally does nothing.In practice:
MatSortHeaderIntlcustomizes nothingsortActionDescriptioninput per column insteadShouldn't
MatSortHeaderIntlitself be deprecated with guidance to usesortActionDescriptioninstead?cheers!
Affected documentation page
https://next.material.angular.dev/components/sort/api#MatSortHeaderIntl