Prompted by @nickchomey, added sorting to the table in this footnote, and it was less than 100 lines of modern JS/DOM and CSS
-
@ericmikkelsen @nickchomey Fixed. Less than 5 extra lines.
-
@sereeena You will be unsurprised to hear that I think the "DX" focus is a bait-and-switch (note the date):
The "Developer Experience" Bait-and-Switch - Infrequently Noted
We cannot continue to use as much JavaScript as is now normal and expect the web to flourish. At the same time, most developers experience no constraint on their use of JS...until it's too late. Lightweight, effective tools are here, but we're stuck in a rhetorical rut. We need to reset our conversation about 'developer experience' to factor in the asymmetric cost of JS.
Infrequently Noted (infrequently.org)
In practice, the focus on JavsScript and convenience for that specific (highly paid) set of developers has disenfranchised HTML and CSS folks who have historically carried the UX torch. The new priesthood very deliberately built its temple on the ruins of the old guard's altars to the user.
-
@slightlyoff
Thanks for working on this.An issue with its current state is `<th role="button" …>` means the table no longer has column headers, only buttons.
What the APG example does is nest a <button> inside the <th> (having the `aria-sort` on the <th> is correct).
-
@slightlyoff Could have been a web component https://github.com/markhobson/web-components-demo
-
@markhobson I can't tell if this is meant as a joke.
-
@cwilcox808 @ericmikkelsen @nickchomey Yeah, I don't want extra elements.
-
@slightlyoff Sorry, a bad one no doubt. I revisited web components after your recent articles and toyed with a sortable table, which this change reminded me of. Apologies for the noise.
-
@slightlyoff @cwilcox808 @nickchomey The answer to this can be whatever, I'm honestly curious, why is that?
-
@markhobson Oh, phew. In context, funny!
-
@ericmikkelsen @cwilcox808 @nickchomey First, shouldn't need them. Second, a real pain to style. Third, as a general matter, extra elements aren't great for performance. Won't matter here, but it adds up.