yargalot / gulp-accessibility

Gulp plugin for AccessSniff
48 stars 12 forks source link

Section508 - Unknown Provider #18

Open JCron245 opened 7 years ago

JCron245 commented 7 years ago

For some reason the Phantom.js file that comes with the gulp plugin is missing the proper switch statement to support Section508

Here is the relevant portion of code in the phantom.js file in accesssniff included with the gulp plugin

  switch (options) {
    case 'WCAG2A':
      page.evaluate(function () {
        return HTMLCS_RUNNER.run('WCAG2A');
      });
      break;
    case 'WCAG2AA':
      page.evaluate(function () {
        return HTMLCS_RUNNER.run('WCAG2AA');
      });
      break;
    case 'WCAG2AAA':
      page.evaluate(function () {
        return HTMLCS_RUNNER.run('WCAG2AAA');
      });
      break;
    default:
      console.log('Unknown standard.');
  }

and here is the switch statement from the accesssniff project

  switch (options) {
    case 'WCAG2A':
      page.evaluate(function () {
        return HTMLCS_RUNNER.run('WCAG2A');
      });
      break;
    case 'WCAG2AA':
      page.evaluate(function () {
        return HTMLCS_RUNNER.run('WCAG2AA');
      });
      break;
    case 'WCAG2AAA':
      page.evaluate(function () {
        return HTMLCS_RUNNER.run('WCAG2AAA');
      });
      break;
    case 'Section508':
      page.evaluate(function () {
        return HTMLCS_RUNNER.run('Section508');
      });
      break;
    default:
      console.log('Unknown standard.');
  }

The version number in the accesssniff files pulled into the gulp plugin seem to indicate it is the latest version so I am not quite sure what is happening here.

JCron245 commented 7 years ago

It looks like the relevant Section508 stuff in the HTMLCS stuff is missing as well.

yargalot commented 7 years ago

@JCron245 Just pushed out 2.4.5 for AccessSniff, Totally forgot to publish it.

Can you give it a burl and see if section508 works?

JCron245 commented 7 years ago

It's doing a Section508 check now but I can't actually get any html to violate it, so it looks like something isn't working. I'll do some more testing with html that should violate 508.