14

With more and more people using things like Backbone, Ember and other JS MVC type frameworks, more and more HTML DOMs are being built dynamically with the first HTML page only containing a "root" element to dump the generated HTML into.

Is this practice 508 complaint?

steveax
  • 17,527
  • 6
  • 44
  • 59
kidcapital
  • 5,064
  • 9
  • 46
  • 68
  • 2
    That would be a question to be addressed for each specific framework, would it not? (I don't know enough about Section 508 to know if it even *can* be addressed, or if compliance would depend on a site's use of a given framework) – Michael Petrotta Nov 30 '12 at 00:56
  • 1
    Kind of depends on how you choose to use the frameworks... – Radu Nov 30 '12 at 01:03
  • Let me rephrase the question to dynamic DOm building. – kidcapital Nov 30 '12 at 01:04
  • 1
    DHTML is not evil. Used properly with the [WAI Accessible Rich Internet Applications](http://www.w3.org/WAI/intro/aria.php) standards, it should be no problem. I don't know about that american law, though. – Bergi Nov 30 '12 at 01:16
  • 1
    No, they are not (assuming that is the only way you are delivering content). But 508 is severely out of date and currently being revised (see my comment to Davis's answer below. – steveax Nov 30 '12 at 01:24

3 Answers3

3

Presumably as long as there is a way for everyone to access whatever information you are supplying, then yes. If you are relying entirely on JavaScript to provide said information, then I would guess no, since not everyone has JavaScript enabled. Section 508 requires <noscript> tags that provide the ability to get the information in by other means because not all assistive technology can access the same. That seems to be the general way these things work (the W3 Accessibility guidelines emphasize that, and the 508 standards, specifically those on equivalency, seem to say much the same).

So the presentation doesn't have to be the same, as long as the experience is "comparable", according to the 508 standards. But I would think that if the presentation relies on JavaScript (and dynamic DOM building requires JavaScript), the experience would not be comparable, and thus you would have to provide an alternative HTML-only version of the site.

Ryan B
  • 3,364
  • 21
  • 35
David John Welsh
  • 1,564
  • 1
  • 14
  • 23
  • 5
    Note that WCAG 1 (like section 508) is severely out of date. [WCAG 2](http://www.w3.org/TR/WCAG/) doesn't have the draconian rules against JavaScript that 508 and WCAG 1 do. The Section 508 rules are currently under revision and will probably end up more in line with WCAG 2, which IMO is the best target these days. – steveax Nov 30 '12 at 01:22
  • Wow, you're right... it's been a while since I read the thing, to my shame. I'll read up on it some more and hopefully come back with a better answer :-/ Cheers! – David John Welsh Nov 30 '12 at 01:26
  • @DavidJohnWelsh: To be technically correct, JavaScript is not required for dynamic, clientside DOM building - there are other technologies, too. Of course those would qualify as "inaccessible" with any criteria :-) – Bergi Nov 30 '12 at 02:30
  • @Bergi Ah, yes, but the only *real* technology for doing it is JS. (Being as I am a web developer, of course, "real" in this instance is defined as "the technology that I use and like and therefore think is better than anything else, including things I may not even know exist" ;-) ) – David John Welsh Nov 30 '12 at 02:39
  • 2
    Man, I never know what to do with an emoticon when a parenthesis must follow it... – David John Welsh Nov 30 '12 at 02:40
  • @steveax your comment is slightly misleading. Yes 508 is out of date, if the OP is designing this for the government, they must follow 508 vs WCAG 2. They are free to do WCAG 2 as long as the S508 standards are met first because agencies are required to do it by law, and are audited by DoJ – Ryan B Nov 30 '12 at 13:27
  • @RyanB good point. If you are mandated to meet 508 you have no choice. Leaves developers in an awkward position at the moment. Current 508 rules are out of touch with the realities of the web and users yet still must be followed by some. Probably the best way to satisfy that is with both client and server side rendering. – steveax Nov 30 '12 at 18:10
3

It all depends on how you do it. I can take a system that's supposed to be 508 compliant (like Plone) and make it completely non-compliant.

If you want to make dynamic sites, I recommend looking into WAI-ARIA. It's part of the official HTML5 spec, and is supported by all major browsers.

In short, WAI-ARIA works by allowing the developer to add a role attribute to a tag. For example, you can give a tag the 'alert' role, if it's something that would pop-up on a page. You can combine roles with CSS and JS to create applications that can be used by individuals with a variety of disabilities.

kcunning
  • 297
  • 1
  • 4
1

I believe, so long as you provide a static version of your webpage, then it should be complaint. MVC and MVVC websites contain AJAX content and, by default, they use JavaScript to push and pull the information on the page as well as construct the DOM. This alone isn't enough, but If you follow the guidelines for providing an indexed version of your website then you can have a full static representation of each page. Those pages are pages that you would want a search engine to see (this would essentially be the same as the public). Follow this approach and theoretically it should work.

Here's some more info about how this works with a MVC JavaScript framework called AngularJS: http://www.yearofmoo.com/2012/11/angularjs-and-seo.html

matsko
  • 21,895
  • 21
  • 102
  • 144