E-mail List Archives
Re: ::after for doc types
From: John Foliot
Date: Aug 4, 2016 8:50AM
- Next message: _mallory: "Re: Header levels"
- Previous message: Karlen Communications: "Re: accessibility guidelines/normative for PDF?"
- Next message in Thread: None
- Previous message in Thread: Swift, Daniel P.: "Re: ::after for doc types"
- View all messages in this Thread
or, rather...
$(this).append('text <img src="docIcon.png" alt="word document">');
(without the alt text, it remains inaccessible ;-) )
JF
On Wed, Aug 3, 2016 at 10:00 AM, Swift, Daniel P. < <EMAIL REMOVED> > wrote:
> You could use JS to check links on page load and append the icon to the
> link if the href ends in docx (for instance). I would think that would
> work okay.
>
> Before:
> <a href="something.docx">text</a>
>
> After:
> <a href="something.docx">text <img src="docIcon.png"/></a>
>
> In jQuery, something like:
> $(document).ready(function(){
> $('a[href$="docx"]').each(function(){
> $(this).append('text <img src="docIcon.png"/>');
> });
> });
>
> My syntax might be a little off, but that would be the gist. Obviously
> include appropriate accessibility tags to go along with the image.
>
> -Dan
>
>
- Next message: _mallory: "Re: Header levels"
- Previous message: Karlen Communications: "Re: accessibility guidelines/normative for PDF?"
- Next message in Thread: None
- Previous message in Thread: Swift, Daniel P.: "Re: ::after for doc types"
- View all messages in this Thread