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

msg:3751030 | 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

msg:3751049 | 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

msg:3751772 | 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?
|
|
|