WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: A simple beginner's question

for

From: Mike Barlow
Date: May 22, 2016 2:46PM


Alexander, the ARIA roles have nothing to do with AJAX. You could have an
entirely static (even no JavaScript potentially) web site and still make
use of ARIA roles (though turning on or off various roles would need to be
done with JavaScript).

And as for using ARIA to inform a user that an error has occurred on an
input field, I'd use the ARIA "role=alert" (or even aria-live=assertive) as
shown in the W3C page on identifying errors -
https://www.w3.org/TR/WCAG20-TECHS/ARIA19.html



*Mike Barlow*
Web Application Developer
Web Accessibility/Section 508 SME

Lancaster, Pa 17601
Office: 732.835-7557
Cell: 732.682.8226
e-mail: <EMAIL REMOVED>

On Sun, May 22, 2016 at 4:32 PM, 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. 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.
>>
>>
> > > > >