E-mail List Archives
Thread: Alts for text links
Number of posts in this thread: 13 (In chronological order)
From: L Snider
Date: Mon, Mar 26 2018 9:59AM
Subject: Alts for text links
No previous message | Next message →
Hi All,
Can anyone think of any examples of where alt text for text links could be
appropriate? There is no image associated with the link. I couldn't, but
just wanted to see if anyone has ever used them. I have seen this three
times in the last while on different websites that have alts and titles in
accordion links (used on links in each category not the category link).
Cheers
Lisa
From: Jared Smith
Date: Mon, Mar 26 2018 10:07AM
Subject: Re: Alts for text links
← Previous message | Next message →
You mean alt on the <a> element? This would not be proper HTML and will do
nothing for accessibility.
Jared
From: L Snider
Date: Mon, Mar 26 2018 10:21AM
Subject: Re: Alts for text links
← Previous message | Next message →
Hi Jared,
Yes, in all cases it was almost the same in the accordion sub category
links:
<a href="URL for PDF" alt="Download the PDF" title="Download the PDF">Doc
Title</a>
In all three, there was a small icon next to the link that must be coming
from the CSS, because there is no trace of it in the HTML at all. I haven't
had a chance to look at the css for any of these that I have come across,
but I am now trying to find the sites again so I can see what is up in
there.
It was odd to see three in a short time, and I just wondered what they were
doing, maybe making up for the icon alt? Even though the icon can be
invisible as it is duplicating everything there.
Cheers
Lisa
On Mon, Mar 26, 2018 at 11:07 AM, Jared Smith < = EMAIL ADDRESS REMOVED = > wrote:
> You mean alt on the <a> element? This would not be proper HTML and will do
> nothing for accessibility.
>
> Jared
> > > > >
From: glen walker
Date: Mon, Mar 26 2018 10:21AM
Subject: Re: Alts for text links
← Previous message | Next message →
If you want an attribute that is similar to the alt attribute but valid for
links, then aria-label or aria-describedby could be used. But as Jared
said, alt itself is not valid.
If your link doesn't have any text, then you could use aria-label. For
example:
<a href="...some path..." aria-label="register now"><i
class="myRegisterNowIcon"></a>
If your link has text but you need additional text, then you could use
aria-describedby. For example:
<h3 id="myid">Survey Results</h3>
...
<a href="...some path..." aria-describedby="myid">Read more</a>
On Mon, Mar 26, 2018 at 10:07 AM, Jared Smith < = EMAIL ADDRESS REMOVED = > wrote:
> You mean alt on the <a> element? This would not be proper HTML and will do
> nothing for accessibility.
>
> Jared
> > > > >
From: L Snider
Date: Mon, Mar 26 2018 10:29AM
Subject: Re: Alts for text links
← Previous message | Next message →
Hi Glen,
Thanks. Aria would have worked great, but wasn't used there. The link has
very good descriptive text (in all three cases), so that is why it was
weird. This must be a plug in likely for Drupal, as the code was almost the
same in each case.
Cheers
Lisa
On Mon, Mar 26, 2018 at 11:21 AM, glen walker < = EMAIL ADDRESS REMOVED = > wrote:
> If you want an attribute that is similar to the alt attribute but valid for
> links, then aria-label or aria-describedby could be used. But as Jared
> said, alt itself is not valid.
>
> If your link doesn't have any text, then you could use aria-label. For
> example:
>
> <a href="...some path..." aria-label="register now"><i
> class="myRegisterNowIcon"></a>
>
> If your link has text but you need additional text, then you could use
> aria-describedby. For example:
>
> <h3 id="myid">Survey Results</h3>
> ...
> <a href="...some path..." aria-describedby="myid">Read more</a>
>
>
>
>
> On Mon, Mar 26, 2018 at 10:07 AM, Jared Smith < = EMAIL ADDRESS REMOVED = > wrote:
>
> > You mean alt on the <a> element? This would not be proper HTML and will
> do
> > nothing for accessibility.
> >
> > Jared
> > > > > > > > > >
> > > > >
From: Lovely, Brian
Date: Mon, Mar 26 2018 10:41AM
Subject: Re: Alts for text links
← Previous message | Next message →
Civilization is crumbling; no one knows HTML any more. I see devs slapping alt attributes on just about anything.
From: L Snider
Date: Mon, Mar 26 2018 10:43AM
Subject: Re: Alts for text links
← Previous message | Next message →
Hi Brian,
I am starting to see that too in a few things, and wondering if it is just
not knowing the HTML or they are just trying to be creative, in a way that
makes no sense?
Cheers
Lisa
On Mon, Mar 26, 2018 at 11:41 AM, Lovely, Brian via WebAIM-Forum <
= EMAIL ADDRESS REMOVED = > wrote:
> Civilization is crumbling; no one knows HTML any more. I see devs slapping
> alt attributes on just about anything.
>
>
From: Sandy Feldman
Date: Mon, Mar 26 2018 11:05AM
Subject: Re: Alts for text links
← Previous message | Next message →
Lovely Brian, you're right. Civilization is crumbling.
best regards, Sandy
On 2018-03-26 12:41 PM, Lovely, Brian via WebAIM-Forum wrote:
> Civilization is crumbling; no one knows HTML any more. I see devs slapping alt attributes on just about anything.
>
>
From: JP Jamous
Date: Mon, Mar 26 2018 12:31PM
Subject: Re: Alts for text links
← Previous message | Next message →
Funny that you mention that Bryan. Here is one for you. How about this code that I witnessed the other day.
<<img> alt="" alt="Customer Support" src="Image.jpg">
I was thinking to myself, someone really failed HTML 101 or did not even take it.
--------------------
JP Jamous
Senior Digital Accessibility Engineer
E-Mail Me |Join My LinkedIn Network
--------------------
From: Birkir R. Gunnarsson
Date: Mon, Mar 26 2018 12:41PM
Subject: Re: Alts for text links
← Previous message | Next message →
When I validate a page I run it through an HtML validator (hey, I am
in charge of the program, I can set a few extra rules).
I flag improper use of HTML as potential accessibility violations
unless they already affect the page in which case I flag them under
the appropriate WCAG success criterion.
If you see weird code, run it through the Nu HtML Checker, you can
copy the specific HtML node and validate it by pasting it into the Nu
checker text editor (select "text" from the dropdown).
On 3/26/18, JP Jamous < = EMAIL ADDRESS REMOVED = > wrote:
> Funny that you mention that Bryan. Here is one for you. How about this code
> that I witnessed the other day.
>
> <<img> alt="" alt="Customer Support" src="Image.jpg">
>
> I was thinking to myself, someone really failed HTML 101 or did not even
> take it.
>
>
>
> --------------------
> JP Jamous
> Senior Digital Accessibility Engineer
> E-Mail Me |Join My LinkedIn Network
> --------------------
>
>
>
From: Lovely, Brian
Date: Mon, Mar 26 2018 12:45PM
Subject: Re: Alts for text links
← Previous message | Next message →
I think my top two accessibility tips for developers are:
Don't add anything unless you have to, and use correct HTML.
From: glen walker
Date: Mon, Mar 26 2018 12:59PM
Subject: Re: Alts for text links
← Previous message | Next message →
I do similar to Birkir, but just to clarify, I only mark invalid html that
could affect accessibility. There could potentially be lots of html errors
that are just bad html coding practices but don't affect accessibility.
While those should be fixed, I like to stay focused just on accessibility
issues.
From: L Snider
Date: Thu, Mar 29 2018 8:07AM
Subject: Re: Alts for text links
← Previous message | No next message
Thanks everyone! Good to know others see weird things too, although maybe
that isn't so good!
Cheers
Lisa
On Mon, Mar 26, 2018 at 1:59 PM, glen walker < = EMAIL ADDRESS REMOVED = > wrote:
> I do similar to Birkir, but just to clarify, I only mark invalid html that
> could affect accessibility. There could potentially be lots of html errors
> that are just bad html coding practices but don't affect accessibility.
> While those should be fixed, I like to stay focused just on accessibility
> issues.
> > > > >