by catapart · 1y ago · 0 comments
Anything that is meant to be read as content should absolutely, without fail, be selectable and copyable (assuming appropriate permissions).
But stuff like tab headers, buttons, or even text-sparse tiles - things meant for the user to click on - can, and usually should, prevent text selection. It is super annoying to be clicking back and forth through tabs only to have some text erroneously highlight and then stay that way.
Exceptions to every rule, and to every exception of that rule, of course. But for the most part, allowing text highlighting in those clickable areas is a rough UX.
* note that I did not include anchor links; those are meant to be inline within text content and should therefore be selectable.
Of course there are many other bad design decisions that go into requiring me to do this, but it's still a real example of why all text should be selectable.
For a demo of click-to-highlight, install IPvFoo and use your mouse in the popup window. See the 'selectWholeAddress' function in https://github.com/pmarks-net/ipvfoo/blob/master/src/popup.j...
Hover shows icon for copy rich link Clicking shows menu with copy plain text, copy rich link, search for backlinks, etc Element itself is a link that can be ⌘-clicked, right clicked etc
Just curious, what was the original reason(s) to make the text non-selectable.
This is a standard UI convention used by all internal dev tools at my current company.
I want to select the text of a link and copy the text of a link. I want to do this but I run into issues _daily_, esp. on mobile. PagerDuty app, I'm looking at you! Mobile seems to assume that you, in no world ever, could ever want to select text.
Often when translating it's easier to just OCR the area with the dictionary app, which is madness when it started as text.
Now I just have to remember this next time I need to select text within a link. :)
That is what it should do.
A designer pointed this out and requested we disable highlighting on button text and draggable handles, and honestly it's a good idea and those problems are now fixed. The downside is that someone can no longer highlight the text on the draggable button that says "Instruction Node" and that's a totally fine tradeoff.
This seems fine to me. For example in inkscape if I drag on the File menu at the top (or double click), I can't start highlighting the "Fi" in the "File" menu label and I'm totally fine with that, same thing here.
Not everyone is fluent in every language, and not every website works perfectly with the browser's translator.
There will be situations where people will want to translate that ONE word that is actually in a button or tab, and isn't selectable because someone thought they knew better.
While having the text in the tabs is very useful to know what is under them, I don't think I've ever needed to actually copy the tab text. It would be a huge UX downgrade for me (and I think most people) if the tab text was selectable.
Some people might need it to be selectable for accessibility reasons and there should be a toggle for that, but I don't think "absolutely all text everywhere is selectable" is a good default.
For Apps agree, as I can install different ones and pick the language regardless of where I am traveling, etc. And page titles (that go on browser tabs) rarely need selection/translation.
At this point, it's not even a technical problem anymore - it's a social one. Even if somehow OS and browser vendors all agreed on a scheme like this, copyright industry and security people would scream bloody murder and prevent it from being implemented.
It's much less frustrating when you can copy-paste the damned labels straight off the site/app, than retyping them and hoping you didn't misspell FooBar as FooBaz, leading the other person into deeper trouble rather than helping.
And since I don't do webdev for a living, most of my quite frequent use of Developer Tools is to work around this kind of nonsense - non-copyable text, obscured text, layout breakage, etc. Second biggest use case is to unbreak web forms that fail silently or for bogus reasons. This happens surprisingly often.
Disabling selection in non-textual parts of websites is unfortunately something that happens quite frequently, but people rarely notice.
This is naturally for websites without i18n. Very common especially in government and public websites.
I meant optimizing every possible usecase. Did you know the button on this very site is not selectable? When you use real semantic html with submit inputs, not buttons, there is text that is not selectable. But it is a button? See what I mean? Draw the line somewhere.
Not making text selectable is extra work. You have to go out of your way to do that. That's the optimization, not the other way around.
If you just do things the way the web expects you will be shocked how much stuff magically works.
The back button too? Yeah, you don't need logic for that. That should just work right off the rip.
To be clear, I HATE that almost everything isn't selectable. It is one of many reasons why I never use mobile apps. Still, somewhere there has to be a line to ship anything.
Has nothing to do with "thinking" anything. It's about testing with accessibility parameters and
knowing* what practical problems occur.If you really need to translate ONE WORD, it's not that onerous to type it. You're bringing edge-case hypotheticals to a discussion about practical functionality.
Hacker News is fully selectable, and still fully useable with the keyboard.
> it's not that onerous to type it.
Yes it is, if I don't even know what the letters are. Not every country uses the latin alphabet. And not every people coming to latin-alphabet countries know what those letters are.
I'm confident that I can type just a tiny fraction of all Latin characters all world languages use. I'm sure that pretty much any Vietnamese word is way beyond my keyboard layout. No clue about writing any non-Latin script. Can you type any Cyrillic, Kanji, Hebrew, Abjad, …, character you see?
On top of the real concerns around otherwise selectable text in a writing system not supported by the user's keyboard, there's also the issue of whether or not they can even operate enough of a keyboard to transcribe whatever text they want to translate.
Just do whatever you want and then listen to your actual users' feedback.
I worked on an application that I had to make button text not selectable because the old people using it kept selecting text on the buttons by mistake instead of clicking/activating the button and getting stuck during a clinical trial.
Should I have left it selectable to pass the HN accessibility shamers purity tests, or listened to the users?
How would you have me type it?
If the word uses the exact character set on your keyboard, sure. How am I going to type Kanji?
by screenshotting it and copying the text out of the screenshot
by putting a screenshot itself into chatgpt
I'm curious what real world scenario you've imagined yourself in with a kanji button that you don't understand within the rest of a website in kanji that you do understand, but don't know how to type kanji?
I just spent several weeks traveling in a country where I have no ability to either type or name any of the characters in the alphabet. Yes, it'd be onerous.
Some of the websites I had to deal with also prevented text selection, or presented text as images.
Another example for buttons. Assuming I don't speak Chinese, how could I know what "下单" and "返回" mean without copy-pasting them into a translator?
For example:
@media(prefers-user-select: all){ * {user-select: all;} }
But that wouldn't guarantee you could select text on an interactive element, plenty of other things could prevent it.If it was an established known issue, then maybe people would do something like:
:not(:lang('base-lang')) { * {user-select: all;} }
It looks like there are plenty of extensions for this:- https://chromewebstore.google.com/detail/user-select-all/aoh...
- https://chromewebstore.google.com/detail/enable-user-select/...
- https://addons.mozilla.org/en-US/firefox/addon/select-like-a...
- https://addons.mozilla.org/en-US/firefox/addon/user-select/
It doesn't. It should, in an ideal world, but it definitely isn't the goal of people who design human-computer interfaces to allow everyone who interacts with a computer to be happy with the way it functions.
Sure, icons on the desktop, or just about anything in a file/app explorer window, require a double-click by default, because the lineage of the main desktop area is just a file explorer window without the window decorations.
I think it might be about stakeholders wanting the web to "feel" more native and interactive. Double-clicking to "go" feels too much like you're interacting with the web as if it's a file browser. They want it to feel more immediate?
In principle I'd prefer the consistency of double-click or double-tap everywhere, but I'm used to adjusting based on context. Wouldn't double-tapping annoy everyone who primarily uses mobile devices?
If consistency between systems is more important than usability, it probably makes more sense to use single click to open in the OS (which has been an option in Windows for 30 years).
The real problem IMO is that we have effectively standardized on two-button mice as the baseline, with all UX then designed around that even though many mice have 5+ buttons these days. The three basic actions that desktop UI has ultimately converged on are: select; activate; show additional actions (context menu). These should logically map to three independent buttons, such that the two most common actions are mapped to buttons that have fingers resting on them in neutral position - e.g. left = activate, right = select, middle = context menu.
At one point round about Win98 Windows took inspiration in the other direction, with Active Desktop: you could change a setting and have single-click to action in Explorer.
Users of just the web are not fully computer literate. The interface is super easy compared to actual programs where you need things like menus, right clicks and full hotkey support.
If I think back to how my mother struggled with computers and how her friends were just as useless, I think they would be stumped with having to double click. Arthritis comes along too, so that generation needed all the help they could get. Generally it was only the advent of online shopping that enabled them to persevere with giving things a go.
That is some Windows UI stuff, If I recall correctly in OSX you don't double click as much.
In the Web version of Outlook, there are regularly times where the location of an appointment is a street address. That text is typically clickable. But the click action doesn't correspond to the choice of mapping service I might want to use in any one instance or to the fact that I might have other actions, like copying the address into another email/sms/etc. Outlook followed your philosophy. You can't select and copy that text, save for going through several auxiliary clicks just to get to a spot where you can. It's the most annoying behavior I can imagine.
That you think that you sitting in a meeting room talking it over with colleagues, or perhaps I'm a meeting in your own mind can assign legitimate uses and not, when something other than say security might be at stake, is just wrongheaded.
And by the way, that address being the link that it is is great 60%, 70% of the time. But when it's not it's clearly a design mistake.
I agree with your address example. That is user data, and it should be selectable.
However, I am sympathetic to those arguing translation. Sometimes I'll visit Japanese or Chinese websites. With some frequency, even if most of the site has an English edition, I'll find some UI element not translated, including buttons and the like... OK I think it was the commenter that I responded to, in a different reply said... just Google it if it's a single word. Great! But I don't even know where to begin to get the right characters from my old fashioned US keyboard. So now I have to Google for how to use my keyboard to get the characters I want, which also may need pre-requisite knowledge of the language I'm trying to translate (radicals and all that jazz)... that's a heavier lift than may be anticipated and where a simple copy/paste into an appropriate translator would make things much, much easier.
I would suggest this: make everything buttons, links, tabs, etc. selectable and copyable unless there is a real explicit and compelling reason to do otherwise. Now to be fair, I'm old enough to have been "online" in some fashion or another since before general public internet access availability was a thing... so my expectations for butter-like user experiences are low and my desire to do any damn thing I want high... but even today, there are probably still more websites which don't stop you from copying anything than there are searching for that polished experience where only the right things can be selected. The discontinuity and the deviation from the expectation that I can copy anything I also find as something which diminishes the user experience, even if occasionally I'm annoyed by over selecting things.
I don't think that's an "exception." I think that's common enough to make me ask: "please don't make that text not selectable ever."
It's more annoying when your web site won't let me copy a package tracking number to paste into my chosen package tracking program. Maybe I don't want to use your system. Maybe the program I have is better.
Just because a web dev can't think of any reasons someone would want to copy text doesn't mean the reasons don't exist. It just means the developer lacks imagination.
How do you do this?
> can, and usually should, prevent text selection
Please don't. You're overthinking. Be a better designer by designing less.
I swear, the platitudes are what kills me. Design and publish a site used by professionals and let me know what kind of feedback you get.
No.
Outlook mail for example is full of your principle, which means copying a mail address becomes a «hover over the not-selectable mail address to pop up a contact card, scroll down the contact card to where the mail address shows up again, but is again unselectable, click the "copy to clipboard" icon»
Just make text selectable.
Instead of disallowing selection on the text with CSS, call `event.preventDefault()` in the click handler. This keeps a click that you handle from triggering the built-in text selection path, but you can still click-and-drag to select text.
And in Japan, the general layout of the "Go back to previous screen" and "confirm and continue" (left and right, respectively), is reversed from what English readers might be used to.
So if I can't select the text... I open up a hand-drawing-chinese-characters app and slowly draw out each character? I'd rather be able to select the text.
Note: unfortunately, so many button in Japanese UIs are actually .png files. I know this from experience of using and building apps and websites here.
Triple-click (at least in FF on Linux) highlights paragraphs or other block-elements contents; it should be allowed on things where a single-click does navigation. This would be very out of the way for normal users, but would allow easily and quickly highlighting (and copying) parts of the interface.
To each their own, but I'd rather neither of those things at the expense of not being able to select "Home", "My Account", "Settings", etc. Shit that nobody actually needs to select anyway.
Do you have an example of a website where selectable text makes keyboard navigation not possible? Could this be a browser problem?
I can tab between links here in HN and it's perfectly also selectable.
Alternatively, set your cursor at the end of the header in the empty space, and drag your mouse backward to highlight the items. At that point, you can highlight the text, because you started in a non-user-select-limited area.
Note that this is default browser behavior. Inspect the styles and see that they have applied no selection styling to those anchors. This is the thing I'm advocating for. Make the web work like the web works, and disregard people telling you that "everything must be selectable" not because it shouldn't be, but because there are features that expect certain functionality to work well with the other features of the web.
Not translating entire articles to a language you don't support has the easy remedy of letting people select the text and use third party tools to support their specific use-cases. But not including translations for your clickable content for languages that aren't supported are the literal practical limits of ability. I would rather my apps work for people in languages I do support, with full accessibility (and minimal scripting overhead), than to have them work poorly for keyboard-only users in all languages, regardless of my app's support for them.
Again, we're talking about the stuff that should be iconic. Things that can literally be represented by icons. Buttons and tab headings. Things that you shouldn't actually need translated AT ALL, much less into every single language there is.
Also if you're a non native speaker you want to be able to select the text so you can translate it
And, more pertinently, why should I support it, at the expense of keyboard-only users?
All three work on Google search results for me.