MCPcopy Create free account
hub / github.com/angular/components / _getAriaSortAttribute

Method _getAriaSortAttribute

src/material/sort/sort-header.ts:207–213  ·  view source on GitHub ↗

* Gets the aria-sort attribute that should be applied to this sort header. If this header * is not sorted, returns null so that the attribute is removed from the host element. Aria spec * says that the aria-sort property should only be present on one header at a time, so removing * ensures

()

Source from the content-addressed store, hash-verified

205 * ensures this is true.
206 */
207 _getAriaSortAttribute() {
208 if (!this._isSorted()) {
209 return 'none';
210 }
211
212 return this._sort.direction == 'asc' ? 'ascending' : 'descending';
213 }
214
215 /** Whether the arrow inside the sort header should be rendered. */
216 _renderArrow() {

Callers

nothing calls this directly

Calls 1

_isSortedMethod · 0.95

Tested by

no test coverage detected