WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Alternative to the Title attribute in Links

for

Number of posts in this thread: 6 (In chronological order)

From: Sarah Jevnikar
Date: Fri, Aug 25 2017 1:53PM
Subject: Alternative to the Title attribute in Links
No previous message | Next message →

Hi again,
I've come across the use of the Title attribute to provide extra information for links, but have read in several places that this is a bad idea. I can't seem to find any alternatives though (on Google, anyway). What else would achieve the same goal? would it be a matter of just changing the link text? Is Aria label a better way to go? Would that work for non-SR users as well? I'm conscious of the fact that most are not.

The code I'm looking at is thus:

<a href="/en/home?order=field_data_holding&amp;sort=asc" title="sort by Data Holding" class="active">Data Holding</a> </th>

Except with NVDA and IE 11 (I'm testing with JFW, Chrome, IE, Firefox and iOS), I'm hearing "Data Holding; sort by data holding", which is what I'd hope to hear.

Thanks again,
Sarah

From: Lovely, Brian (CONT)
Date: Fri, Aug 25 2017 2:03PM
Subject: Re: Alternative to the Title attribute in Links
← Previous message | Next message →

A warning about aria-label (and aria-labelledby): they are greedy. Which is to say, they don't concatenate with other possible accessible name strings. So:


<a href="#" aria-label="Opens in a separate window">edit my details</a>

will just read out as "link opens in a separate window"

You could use aria-described by, like

<a href="/en/home?order=field_data_holding&amp;sort=asc" aria-describedby="link_details" class="active">Data Holding</a>

<div id="link_details"> sort by Data Holding</div>


However, I have had this ominous feeling about the title attribute as well, but in an earlier thread it was established that my mistrust was misplaced. Title is a legitimate tool for constructing an accessible name.

-----Original Message-----
From: WebAIM-Forum [mailto: = EMAIL ADDRESS REMOVED = ] On Behalf Of Sarah Jevnikar
Sent: Friday, August 25, 2017 3:54 PM
To: WebAIM Discussion List < = EMAIL ADDRESS REMOVED = >
Subject: [WebAIM] Alternative to the Title attribute in Links

Hi again,
I've come across the use of the Title attribute to provide extra information for links, but have read in several places that this is a bad idea. I can't seem to find any alternatives though (on Google, anyway). What else would achieve the same goal? would it be a matter of just changing the link text? Is Aria label a better way to go? Would that work for non-SR users as well? I'm conscious of the fact that most are not.

The code I'm looking at is thus:

<a href="/en/home?order=field_data_holding&amp;sort=asc" title="sort by Data Holding" class="active">Data Holding</a> </th>

Except with NVDA and IE 11 (I'm testing with JFW, Chrome, IE, Firefox and iOS), I'm hearing "Data Holding; sort by data holding", which is what I'd hope to hear.

Thanks again,
Sarah
The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.

From: JP Jamous
Date: Sat, Aug 26 2017 3:08PM
Subject: Re: Alternative to the Title attribute in Links
← Previous message | Next message →

Sarah,

Why not just make the link label what you want it to announce? I am unsure why you wish to complicate your design.

<a
href="/en/home?order=field_data_holding&amp;sort=asc"
class="active">Data Holding">
sort by Data Holding
</a>
1. If you are adding a background image to your link through CSS, I would fail that because you will be asking for lots of problems.
Title attribute only works with IE and not always guaranteed to work.
Tooltips are difficult for low vision users to see.

-----Original Message-----
From: WebAIM-Forum [mailto: = EMAIL ADDRESS REMOVED = ] On Behalf Of Sarah Jevnikar
Sent: Friday, August 25, 2017 2:54 PM
To: WebAIM Discussion List < = EMAIL ADDRESS REMOVED = >
Subject: [WebAIM] Alternative to the Title attribute in Links

Hi again,
I've come across the use of the Title attribute to provide extra information for links, but have read in several places that this is a bad idea. I can't seem to find any alternatives though (on Google, anyway). What else would achieve the same goal? would it be a matter of just changing the link text? Is Aria label a better way to go? Would that work for non-SR users as well? I'm conscious of the fact that most are not.

The code I'm looking at is thus:

<a href="/en/home?order=field_data_holding&amp;sort=asc" title="sort by Data Holding" class="active">Data Holding</a> </th>

Except with NVDA and IE 11 (I'm testing with JFW, Chrome, IE, Firefox and iOS), I'm hearing "Data Holding; sort by data holding", which is what I'd hope to hear.

Thanks again,
Sarah
---
This email has been checked for viruses by AVG.
http://www.avg.com

From: Birkir R. Gunnarsson
Date: Sat, Aug 26 2017 4:48PM
Subject: Re: Alternative to the Title attribute in Links
← Previous message | Next message →

Your use of the title attribute is exactly per spec (this is the type
of additional info the title attribute is supposed to communicate).
The fact that browsers and assistive technologies fail to support it
keeps baffling me, and I find it very questionable for authors to have
to avoid using an attribute that has been around almost as long as the
HTML language itself because no one has bothered to support it.
The onus is on browsers and a.t. to implement accessible support for
the title attribute (at least on focusable elements), or on W3C to
drop the title attribute from the HTmL spec.
That being said, if the information you are communicating through the
title attribute was essential to understanding the link I would advise
to put that text int he link itself. In your situation I think it is
fine.
The active class worries me. If this indicates the link is the active
link in a list of links it needs aria-current="true" to communicate
same to assistive technology users.



On 8/26/17, JP Jamous < = EMAIL ADDRESS REMOVED = > wrote:
> Sarah,
>
> Why not just make the link label what you want it to announce? I am unsure
> why you wish to complicate your design.
>
> <a
> href="/en/home?order=field_data_holding&amp;sort=asc"
> class="active">Data Holding">
> sort by Data Holding
> </a>
> 1. If you are adding a background image to your link through CSS, I would
> fail that because you will be asking for lots of problems.
> Title attribute only works with IE and not always guaranteed to work.
> Tooltips are difficult for low vision users to see.
>
> -----Original Message-----
> From: WebAIM-Forum [mailto: = EMAIL ADDRESS REMOVED = ] On Behalf
> Of Sarah Jevnikar
> Sent: Friday, August 25, 2017 2:54 PM
> To: WebAIM Discussion List < = EMAIL ADDRESS REMOVED = >
> Subject: [WebAIM] Alternative to the Title attribute in Links
>
> Hi again,
> I've come across the use of the Title attribute to provide extra information
> for links, but have read in several places that this is a bad idea. I can't
> seem to find any alternatives though (on Google, anyway). What else would
> achieve the same goal? would it be a matter of just changing the link text?
> Is Aria label a better way to go? Would that work for non-SR users as well?
> I'm conscious of the fact that most are not.
>
> The code I'm looking at is thus:
>
> <a href="/en/home?order=field_data_holding&amp;sort=asc" title="sort by Data
> Holding" class="active">Data Holding</a> </th>
>
> Except with NVDA and IE 11 (I'm testing with JFW, Chrome, IE, Firefox and
> iOS), I'm hearing "Data Holding; sort by data holding", which is what I'd
> hope to hear.
>
> Thanks again,
> Sarah
> > > http://webaim.org/discussion/archives
> >
>
> ---
> This email has been checked for viruses by AVG.
> http://www.avg.com
>
> > > > >


--
Work hard. Have fun. Make history.

From: Devarshi Pant
Date: Sat, Aug 26 2017 5:04PM
Subject: Re: Alternative to the Title attribute in Links
← Previous message | Next message →

That's a fine technique. Title attribute complements the link text in this
case.


On Aug 25, 2017 15:53, "Sarah Jevnikar" < = EMAIL ADDRESS REMOVED = > wrote:

Hi again,
I've come across the use of the Title attribute to provide extra
information for links, but have read in several places that this is a bad
idea. I can't seem to find any alternatives though (on Google, anyway).
What else would achieve the same goal? would it be a matter of just
changing the link text? Is Aria label a better way to go? Would that work
for non-SR users as well? I'm conscious of the fact that most are not.

The code I'm looking at is thus:

<a href="/en/home?order=field_data_holding&amp;sort=asc" title="sort by
Data Holding" class="active">Data Holding</a> </th>

Except with NVDA and IE 11 (I'm testing with JFW, Chrome, IE, Firefox and
iOS), I'm hearing "Data Holding; sort by data holding", which is what I'd
hope to hear.

Thanks again,
Sarah

From: Sailesh Panchang
Date: Mon, Aug 28 2017 7:31AM
Subject: Re: Alternative to the Title attribute in Links
← Previous message | No next message

Would it be possible to include an img tag within the link for the
currently sorted column and using its alt to convey the sort
direction? No title will be needed then in this situation although it
is a valid attribute whose value can be dynamically set too.
Example:
http://www.mindoversight.com/demo/Stocklist.htm

Thanks and regards,

On 8/25/17, Sarah Jevnikar < = EMAIL ADDRESS REMOVED = > wrote:
> Hi again,
> I've come across the use of the Title attribute to provide extra information
> for links, but have read in several places that this is a bad idea. I can't
> seem to find any alternatives though (on Google, anyway). What else would
> achieve the same goal? would it be a matter of just changing the link text?
> Is Aria label a better way to go? Would that work for non-SR users as well?
> I'm conscious of the fact that most are not.
>
> The code I'm looking at is thus:
>
> <a href="/en/home?order=field_data_holding&amp;sort=asc" title="sort by Data
> Holding" class="active">Data Holding</a> </th>
>
> Except with NVDA and IE 11 (I'm testing with JFW, Chrome, IE, Firefox and
> iOS), I'm hearing "Data Holding; sort by data holding", which is what I'd
> hope to hear.
>
> Thanks again,
> Sarah
> > > > >


--
Sailesh Panchang
Principal Accessibility Consultant
Deque Systems Inc
Phone 703-225-0380 ext 105
Mobile: 571-344-1765