jdan / 98.css

A design system for building faithful recreations of old UIs
https://jdan.github.io/98.css
MIT License
9.2k stars 301 forks source link

Selecting Label Text #23

Closed DavidBradbury closed 4 years ago

DavidBradbury commented 4 years ago

Couldn't find a position on this, so I figured I'd mention it here.

Traditionally on Windows platforms (Including Windows 98), labels (and legends, window title bars, etc) cannot have their text selected. Modern systems allow you to double-click labels to copy their text however.

As accessibility is a priority, I'd recommend considering the ramifications of this. With my experience with assistive technology, you should still be able to read those out, even with text selection disallowed.

Another option may be able to have a utility class that explicitly allows for selection (Or a custom data attribute) but there doesn't seem to be much of that in this project so far.

Either way, I thought it'd be good to discuss!

jdan commented 4 years ago

Good call out! I thought about this, but decided that I know a lot of people who read text by dragging their cursor and highlighting text. It's just a quirk from when we started building full-on applications in the browser.

I'm inclined to encourage end-users to add user-select: none as they see fit when using this library, but I don't feel super comfortable doing it for them. Does that make sense? Happy to chat more!