I'm having trouble finding a clear answer as to whether as site can pass for at least WCAG 2.0 level A if it uses AJAX in some way.
For example from WCAG2.0 states
"Can I meet WCAG 2.0 with Javascript/Ajax, Flash, PDF, Silverlight, and other technologies? WCAG 2.0 is designed to apply to a broad range of web technologies."
That does not exactly say "yes/no". Some documents suggest that a site has to function with JavaScript completely disabled (in which case the obvious answer is no), but I have the impression that this is old information, and the use of JavaBcript is no longer an absolute barrier (please correct me if this is wrong!).
Maybe this is because it is too broad to give a blanket "YES", so let me give a concrete (simplified but essentially the same) situation.
1) If my site uses AJAX to generate a list of data (let's say, a list of users) immediately after page load, can I expect to pass at least at Level A (and maybe even higher levels?) A simplified example to illustrate:
<h1> Stuff loads here on page load </h1>
<div id="thisIsWhereContentGoes">
</div>
<script type="text/javascript">
var url = 'http://yourfavoritedatasource.url';
var request = $.ajax({
url: url,
type: "post",
data: 'text'
});
request.done(function (response, textStatus, jqXHR){
jQuery('#thisIsWhereContentGoes').html(response);
});
</script>
My guess is that this is ok.
2) Going just a little further, say I have some controls (like prev/next to scroll through pages of a list or update content, for simplicitly lets say these are just anchor tags), can I also expect this to pass at A/AA/AAA? A slight modification to the code above:
<a href="javascript:doRequest()"> Next </a>
<script type="text/javascript">
doRequest();
function doRequest()
{
var url = 'http://yourfavoritedatasource.url';
var request = $.ajax({
url: url,
type: "post",
data: 'text'
});
request.done(function (response, textStatus, jqXHR){
jQuery('div').html(response);
});
}
</script>
I'm hoping this is also ok.
I hope I'm just being pedantic and this is all ok. As far as I see none of this seems to conflict with WebAim's WCAG checklist