WebAIM - Web Accessibility In Mind

E-mail List Archives

ASP.NET Textbox Controls and ARIA Attributes

for

From: Elle
Date: Sep 21, 2011 5:03AM


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