WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Using CSS to hide a portion of the link text

for

From: Dan Conley
Date: Aug 3, 2009 7:40AM


Couldn't you give a span {display:none} (or display inline if that's
what you'd prefer) in a print stylesheet? What would you say 'do[ing] it
right the first time' is? Here's what the TOC on one of my sites looks like:

Activities of Daily Living (PDF)
Adult Education and Intellectual and Allied Developmental Disabilities (PDF)
Amnesia (PDF)
Aphasia (PDF)

The titles are for html, the PDF links to the PDF version. I hadn't
thought of a way of differentiating the PDF links until now, but this
seems like a decent way to do it. The only issue I can see is that with
stylesheets disabled, the link text will be overly long (especially for
AEIADD above).

Dan Conley

Geof Collis wrote:
> These ideas sound good in principle but what happens if someone wants
> to print off the page and take it to a presentation where the link
> url is necessary. Sure you could write more code to do this but why
> not just do it right the first time instead of doing all of this
> extra coding just because you can?
>
> At 09:03 AM 8/3/2009, you wrote:
>> I have used hidden CSS to
>>
>> 1. Create distinct link text
>> 2. Provide a Header for navigation when there is no text on the
>> visual screen.
>> 3. Provide a Label for a form field when there is no text on the
>> visual screen.
>>
>>
>>
>>