WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: ASP.NET Textbox Controls and ARIA Attributes

for

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

From: Elle
Date: Wed, Sep 21 2011 5:03AM
Subject: ASP.NET Textbox Controls and ARIA Attributes
No previous message | Next message →

Has anyone had any trouble with assigning aria-invalid and aria-describedby
attributes to textbox controls for a form when using ASP.NET? We're using
ASP.NET 4, and the team has implemented AssociatedControlID attributes to
properly associate the textboxes with labels. When trying to specify
aria-invalid or aria-describedby attributes on the page or programmatically
add them to the textbox control in the code-behind, we're noticing that they
are removed when those input controls are rendered by .NET.

Is it allowable to add these aria attributes to the labels instead?


Thanks very much,
Elle

From: Sailesh Panchang
Date: Wed, Sep 21 2011 8:45AM
Subject: Re: ASP.NET Textbox Controls and ARIA Attributes
← Previous message | Next message →

Elle,
If .NET is removing these attributes then it is a bug....NET does not
recognize them?
The attributes are meant to be used on a UI element that gains
focus... LABEL is not one of them.
Sailesh

On 9/21/11, Elle < = EMAIL ADDRESS REMOVED = > wrote:
> Has anyone had any trouble with assigning aria-invalid and aria-describedby
> attributes to textbox controls for a form when using ASP.NET? We're using
> ASP.NET 4, and the team has implemented AssociatedControlID attributes to
> properly associate the textboxes with labels. When trying to specify
> aria-invalid or aria-describedby attributes on the page or programmatically
> add them to the textbox control in the code-behind, we're noticing that they
> are removed when those input controls are rendered by .NET.
>
> Is it allowable to add these aria attributes to the labels instead?
>
>
> Thanks very much,
> Elle
>

From: Elle
Date: Wed, Sep 21 2011 9:03AM
Subject: Re: ASP.NET Textbox Controls and ARIA Attributes
← Previous message | No next message

Thanks, Sailesh!

I will send that information along to the team. Would this be something
specific to the .NET 4.0 framework? We've had no trouble at all using
different aria attributes using 3.5, for example. As a workaround, would it
be possible for us to programmatically set focus to the <label> element
(tabindex=-1) when an error occurs?


Much appreciated,
Elle