WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: ASP.NET Textbox Controls and ARIA Attributes

for

From: Sailesh Panchang
Date: Sep 21, 2011 8:45AM


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 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
>