Tota11y Accessibility

Published on December 22, 2017

tota11y, accessibility

Adding the Tota11y Web Accessibility Tool to your site is just a matter of adding the script call to the Tota11y script, just above the tag in your template.

One way to use this in an automated fashion, is via the actual UI display itself. The javascript code below runs through all the check option, then exits on the first fail, with error output detail.

Context: webdriverio'.tota11y-toolbar-toggle');
     var list = ['Headings', 'Contrast', 'Link text', 'Labels', 'Image alt-text'];
     for (var i = 0; i < list.length; i++) {'.tota11y-plugin-title*=' + list[i]);
         const isVisible = browser.isVisible('.tota11y-info-errors');
         const errors = browser.getText('.tota11y-info-errors');
         expect(isVisible).to.not.equal(true, errors);