Maxl94 / ngx-multi-sort-table

MIT License
40 stars 20 forks source link

Aria-Sort not correctly set before sorting #189

Closed fanalin closed 7 months ago

fanalin commented 8 months ago

The aria-sort attribute of the th is a bunch of javascript when the column hasn't been ordered by.

Bildschirmfoto 2024-03-28 um 14 38 18

aria-sort="_getAriaSortAttribute() { if (!this._isSorted()) { return "none"; } return this.getSortDirection() === "asc" ? "ascending" : "descending"; }"

When I click on the column header, the javascript is correctly executed and the aria-sort attribute is set to ascending/descending.

Tested with the latest angular, angular-material (17.3) and ngx-mat-multi-sort (17.1.0), but issue is also found in older versions.

Catscratch commented 7 months ago

Can confirm this. Not sure if the binding is still needed. I created a PR and will ask Max to have a look.

Catscratch commented 7 months ago

It's merged. But since it does not affect the runtime atm, I decided to not build a hotfix version for that. It will be part of the next regular release.