homepage Welcome to WebmasterWorld Guest from 54.237.98.229
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / Accessibility and Usability
Forum Library, Charter, Moderators: ergophobe

Accessibility and Usability Forum

    
Copy and Paste without hidden text
Stop following me about!
aka_Robbie

5+ Year Member



 
Msg#: 3751028 posted 9:45 am on Sep 24, 2008 (gmt 0)

Folks

I'm currently working on a page that contains a list of results for a search. One of the things required is hit highlighting for the search term.

So if you were to search for "stuff" it would return:
Dramatic stuff in Political Play

However we have made it accessible for speaking browsers such as JAWS. So it returns:
Dramatic hit stuff in Political Play

As such the html output is:
Dramatic <span class="hit"><span class="hiddenText">hit</span>stuff</span> in Political Play

where class "hit" does the bold, underline, highlighting etc for the browsers, and class "hiddenText" does the obvious and hides the word (to the left of the viewable area) "hit" unless read out.

Unfortunately if a user selects the text "Dramatic stuff in Political Play" and then tries to copy and paste it (into notepad or Word for example), they get "Dramatic hit stuff in Political Play".

Is it possible to do something so that if a user copies and pastes the word "hit" is not picked up?

Cheers

 

lavazza

5+ Year Member



 
Msg#: 3751028 posted 10:20 am on Sep 24, 2008 (gmt 0)

How about using an @media aural stylesheet [w3.org]?

e.g.

@media aural { 
.hiddenText{
display:inline;
}
}
@media screen {
.hiddenText{
display:none;
}
}

NB
I don't have a screen reader on this machine, so I haven't tested the idea

aka_Robbie

5+ Year Member



 
Msg#: 3751028 posted 9:18 am on Sep 25, 2008 (gmt 0)

Thanks for the suggestion lavazza, unfortunately it was a no-goer. It resulted in:

Dramatic hitstuff in Political Play

as has many other things I have tried :(

We're using Tapestry along with Prototype and Scriptaculous, so I'm wandering if I should be looking more down that route than traditional code and css?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Accessibility and Usability
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved