Hacker News new | ask | show | jobs
by uzername 1077 days ago
I recently saw a cool trick with css and tables. Using after pseudo selector with content and the attr css function, the small viewport layout showed the th labels without having to have two simultaneous tables in the dom. I think the downside of this could be accessibility issues, since I'm not sure if a screen reader would see those virtual labels vs literally reading what's in dom.

https://developer.mozilla.org/en-US/docs/Web/CSS/attr