WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: A simple beginner's question

for

From: Chaals McCathie Nevile
Date: May 23, 2016 3:40AM


On Sun, 22 May 2016 20:32:04 -0000, Alexander Karelas
< <EMAIL REMOVED> > wrote:

> When a submitted form contains errors and re-appears to the user
> together with the error messages, I need some way to co-relate each
> error message with a text field.

In this case you could probably use the label element.

cheers

> For this, I had thought of using the aria-describedby property. Am I
> wrong? I read somewhere that I could do that. if I don't use this aria
> attribute, as you say that I don't have to, then how am I going to
> relate the error message to the field, so that my user will know?
>
> Do aria-* attributes apply to websites that don't have any AJAX?
>
> Thanks,
>
>
>
> On 22/05/16 23:21, Léonie Watson wrote:
>>> From: WebAIM-Forum on Behalf Of Alexander Karelas
>>> Sent: 22 May 2016 20:57
>>> I'm creating a website without any AJAX, that I want to be accessible.
>>>
>>> Should I use the aria-* attributes and rely on them? Or are aria-*
>>> attributes
>>> only for AJAX websites?
>> If you use HTML elements for their intended purpose, there shouldn't be
>> any need to use ARIA. ARIA is used when HTML isn't able to provide the
>> semantic information you need.
>>
>> For example if you use the <button> element, the browser knows it is a
>> button. There is no need to use ARIA to tell the browser something it
>> already knows. Putting role="button" on the <button> element is
>> therefore redundant.
>>
>> But there is no way in HTML to indicate when a button has been pressed.
>> This is a time when ARIA can be used to fill in the gap. You can set
>> aria-pressed="true" on a button to indicate when it has been pressed.
>>
>> These notes on using ARIA in HTML might be helpful:
>> http://w3c.github.io/aria-in-html/
>>
>> Léonie.
>>
>
> > > > --
Charles McCathie Nevile - web standards - CTO Office, Yandex
<EMAIL REMOVED> - - - Find more at http://yandex.com