Sha256: 46a60448136ffd99ed18526cbcd5b994388ffd554b2e7008ff75d29df7f79416

Contents?: true

Size: 642 Bytes

Versions: 83

Compression:

Stored size: 642 Bytes

Contents

/* eslint-disable no-console */

import axe from 'axe-core'

export const runAxe = function(include = '.pb--kit-example', ignore = ['.pb--kit-example :first-child']) {
  axe
    .run({
      include: [include],
      exclude: [ignore],
    })
    .then((results) => {
      if (results.violations.length) {
        console.warn('🚨 [axe-core] Accessibility issues found. See below for a list:')
        console.dir(results.violations)
      } else {
        console.log('[axe-core] Yay! 🎉 No accessibility violations were found!')
      }
    })
    .catch((err) => {
      console.error('Something bad happened:', err.message)
    })
}

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
playbook_ui-9.19.0 app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.19.0.pre.alphafonts app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.18.0.flow.bin.alpha app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.18.0 app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.17.0 app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.16.0 app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.15.0 app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.14.1.alpha.radio.alignment app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.14.1.alpha.highcharts9 app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.14.1 app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.13.0 app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.12.0 app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.12.0.pre.text.addon app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.11.0 app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.10.0 app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.10.0.pre.date.time.stacked.1 app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.10.0.pre.alpha2 app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.10.0.pre.alpha1 app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.9.0.alpha.inline1 app/pb_kits/playbook/utilities/accessibility.js
playbook_ui-9.9.0 app/pb_kits/playbook/utilities/accessibility.js