At 6/12/2009 01:42 AM, James Ducker wrote:
Something I've been pondering - how best to handle buttons and other purely functional content residing within a block of selected text? Often a user will select a bunch of text and get something like:

> Some Headingminimiseclose
> Some text etc etc.

I was thinking about adding JS mouse drag detection to hide "minimise" and "close" (let's say they're <a> elements) when the user is mouse-selecting text, but it would fail if a user used the text cursor to select.


It sounds as though you've already answered your own question -- don't let the controls reside within the block of copyable text. In most circumstances the user will want to copy the header along with the body text of a given section, so rather than inserting the controls in the middle of copyable text I'd put them before or after. If you want the controls to appear to the right of the heading in a left-to-right text flow, you could try putting them first in the markup and then floating them right or absolutely positioning them so the heading and text are contiguous.

A more elegant & bulletproof solution might be to rethink the page layout and visually place the controls above or to the left of the heading to allow the natural text flow to exclude them from selection. If the controls look like they're in the middle of the copyable text, a user with browsing experience will naturally worry that the controls will get copied along with the text, diminishing very slightly their sense of trust in the intuitiveness of the design. A layout that puts them outside the selection highlight altogether -- modelled by the resize & close buttons in pc & mac windows that everyone's familiar with -- would be more of a no-brainer to use.

Finding a way to reliably make the controls disappear while the user selects text sounds cool -- I can imagine all the ads and navigation and chromy bits disappearing while copying a story from a news site, for example, leaving my clipboard with the story I'm after not needing to be cleaned up -- but it also sounds a bit paternalistic in deciding in advance for an unknown user what they're going to want to select. If you place the controls before the heading in the markup, you leave it to the user to decide whether to include them in the selection highlight. For all you know, their purpose in copying text from the page is to illustrate in a document that aspect of the page layout that includes the controls. There's such a thing as trying to be too helpful.

Regards,

Paul
__________________________

Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to