Has anyone faced any issues with using AJAX with update panels and keeping their sites 508/ Accessibility compliant? Is there a way to detect that javascript is turned off and force update panels to work as synchronous?
508 Compliance - ASP.NET webforms Update Panels
816 views Asked by ved AtThere are 2 answers
As long as you don't trigger post back using JavaScript exclusively, then ASP.NET will fall back to regular post backs, which are basically HTML form submissions. Server side page life cycle is more or less the same using <asp:UpdatePanel>
so given that, your page should degrade gracefully.
Where you may get into problems is when you must use a control like the <asp:LinkButton>
as this control relies on JavaScript to perform a post back. You can work around this using the following (example) code:
<noscript>
<asp:Button runat="server" OnClick="Click_Handler" Text="Update" />
</noscript>
<asp:LinkButton runat="server" OnClick="Click_Handler" Text="Update" />
Clients that do not support JavaScript should render the regular button first, other browsers should ignore it. To increase usability you should consider showing the link element using JavaScript:
<span class="hidden">
<asp:LinkButton runat="server" OnClick="Click_Handler" Text="Update" />
</span>
<script type="text/javascript">
// PSEUDO CODE:
document.ready ? for each span.hidden : show
</script>
JavaScript-based post back can occur for several controls and events, not just the LinkButton
(e.g. DropDown
control with AutoPostBack="True"
or TextBox
with OnTextChanged
event).
Section 508 guidelines are moving toward WCAG 2.0.
http://www.access-board.gov/sec508/refresh/draft-rule.htm#e107
WAI-ARIA is a critical technology for making dynamic web sites accessible. This relates directly to using UpdatePanels. Using WAI-ARIA tags, assistive technology can receive notifications from the browser, via the accessibility API, that a panel has been updated. Using WAI-ARIA, you don't have to be as concerned about making a synchronous request for new content. However, if you are still concerned, look into using a technique called 'progressive enhancement.'
Using the WAI-ARIA approach will move your application toward the future of accessibility and have it in good shape for the 508 harmonization with WCAG 2.0.
This is a big topic, so you'll likely have more questions.