W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2014

Re: Adding ARIA properties to form elements with class names

From: Joshue O Connor <joshue.oconnor@ncbi.ie>
Date: Fri, 25 Apr 2014 20:57:23 +0100
Message-ID: <535ABE23.5050206@ncbi.ie>
To: sailesh.panchang@deque.com
CC: Joshue O Connor <joshue.oconnor@cfit.ie>, Steve Faulkner <faulkner.steve@gmail.com>, "public-pfwg-comments@w3.org" <public-pfwg-comments@w3.org>, "w3c-wai-ig@w3.org" <w3c-wai-ig@w3.org>
Thanks all, for comments and suggestions!


Sailesh Panchang wrote:
> Joshue,
> If I understand your intent correctly,  sure using jQuery for instance
> one can use CSS class selectors to add attributes including ARIA
> attributes to elements. And in some situations it will work fine.  For
> instance
> <label>Start date:<input class="datefld" aria-describedby="dtFormat"
> type="text" /></label>
> <label>End date:<input class="datefld" aria-describedby="dtFormat"
> type="text" /></label>
> And on the page it says
> <p id="dtFormat">Please enter date as Mm / Dd / YYYY</p>
> JQuery:
> ($('input').filter('.datefld').attr("aria-describedby="dtFormat"));
> But as Steve noted, one may not be able to circumvent for-id markup
> if the intent is to label form controls explicitly.
> Regards,
> Sailesh
> On 4/25/14, Joshue O Connor<joshue.oconnor@cfit.ie>  wrote:
>> Steve Faulkner wrote:
>>> On 25 April 2014 14:18, Joshue O Connor<joshue.oconnor@cfit.ie>   wrote:
>>>> Can ARIA properties be added to input controls using class names, rather
>>>> than using IDs?
>>> hi Josh assuming you mean can the class name be used as a ref, for
>>> example:
>>> <span class="classa">label</span>
>>> <a aria-labelledby="classa">text</a>
>>> answer is no, only references to valid id values
>> Right. I mention it, because when auditing I come across INPUT elements
>> that have existing class names often. I think if some ARIA functionality
>> could piggy back on what is there already, rather than getting authors
>> to add unique ID values for each element that they want pimp
>> semantically, then its win win.
>> Josh
>>> Regards
>>> SteveF
>>> HTML 5.1<http://www.w3.org/html/wg/drafts/html/master/>

Follow us on Facebook: https://www.facebook.com/ncbiworkingforpeoplewithsightloss
Follow us on Twitter: www.twitter.com/ncbi_sightloss

Check-out NCBI's Mícheál Ó Muircheartaigh appeal on the following link. 

NCBI Group - CRO No 26293  CHY 20902 
NCBI Services - CRO No 527862  CHY 4626
NCBI Retail - CRO No 527863  CHY 20619
NCBI Charitable Foundation - CRO No 527864 CHY 12673 

Information in this email (including attachments) is confidential.  It is intended for receipt and consideration only by the intended recipient.  If you are not an addressee or intended recipient, any use, dissemination, distribution, disclosure, publication or copying of information contained in this email is strictly prohibited.  Opinions expressed in this email may be personal to the author and are not necessarily the opinions of NCBI.

If this email has been received by you in error we would be grateful if you could immediately notify the IT Service Desk by telephone at +353 1 8821911 or by email to service.desk@ncbi.ie and thereafter delete this e-mail from your system

Received on Friday, 25 April 2014 19:58:03 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:51 UTC