Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test accessibility for people with disabilities, using tools such as WAVE44 and Pa11y45 to help identify and correct accessibility issues #329

Open
sah0017 opened this issue Nov 10, 2022 · 1 comment

Comments

@sah0017
Copy link
Contributor

sah0017 commented Nov 10, 2022

No description provided.

@kussmaul
Copy link
Collaborator

I've used pa11y-ci for another project. Here is a starter config file.

//  NOTES:
//    to prep:     mkdir ./pa11y
//    to install:  npm install pa11y-ci
//    to run:      npx pa11y-ci --config pa11y-ci.conf.js

var site      = 'http://127.0.0.1:5000';
var username  = '[email protected]';
var password  = 'pa11ypassword';

module.exports = {
  defaults : {
    chromeLaunchConfig  : {
      executablePath      : '/usr/lib64/chromium-browser/chromium-browser',
      args                : [ '--enable-logging=stderr', '--v=1' ],
    },
    concurrency         : 1,
    ignore              : [
      'WCAG2AAA.Principle1.Guideline1_4.1_4_6.G17.Fail', // insufficient contrast: 7:1
    ],
    level               : 'warning',
    reporters           : [ 'cli', [ 'json', { fileName: '.pa11y/results.json' } ] ],
    standard            : 'WCAG2AAA',
    useIncognitoBrowserContext : false,
  },

  urls : [
    { url     : `${site}/login`,
      actions : [
        'wait for element form.form-signin to be visible',
        'screen capture .pa11y/login0.png',
        `set field #email to ${username}`,
        `set field #password to ${password}`,
        'click element button.btn-primary',
        'wait for path to not be /login',
        'screen capture .pa11y/login1.png',
    ]},

    { url     : `${site}/instructor_project`,
      actions : [
        'wait for element div.middle to be visible',
        'screen capture .pa11y/instructor_project0.png',
    ]},

    { url     : `${site}/create_project`,
      actions : [
        'wait for element input#project_name to be visible',
        'screen capture .pa11y/create_project0.png',
        'set field #project_name to Pa11y Project',
        'set field #project_description to Pa11y Description',
        'click element button.w3-button',
        'screen capture .pa11y/create_project1.png',
    ]},

    { url     : `${site}/account/success`,
      actions : [
    ]},

    { url     : `${site}/project_profile_jumptool`,
      actions : [
    ]},

    { url     : `${site}/logout`,
      actions : [
        'wait for element form.form-signin to be visible',
        'screen capture .pa11y/logout0.png',
    ]},
  ], // end urls
}; // end module.exports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants