Robot Framework resources for automating accessibility tools¶
WAVE Toolbar library¶
Include keywords with:
Resource Accessibility/wavetoolbar.robot
Example of use:
*** Settings ***
Resource Accessibility/wavetoolbar.robot
Suite setup Run keywords
... Open accessibility test browser Maximize Browser Window
Suite teardown Close all browsers
*** Test Cases ***
Test pages
[Template] Check WAVE
http://www.plone.org/ wave=0
*** Keywords ***
Check WAVE
[Arguments] ${url} ${wave}=0
Should not exceed maximum WAVE errors ${url} ${wave}
Should not exceed maximum WAVE errors
[Arguments] ${url} ${max}
${errors} = Count WAVE accessibility errors ${url}
Should be true ${errors} <= ${max}
... WAVE Toolbar reported ${errors} errors for ${url}
Note
Currently all keywords are written as user keywords, but later they may be
refactored into Python-keywords. If this happens, there will be backwards
compatible wrappers available at wavetoolbar.robot
.
WCAG Contrast Checker library¶
Include keywords with:
Resource Accessibility/contrastchecker.robot
Example of use:
*** Settings ***
Resource Accessibility/contrastchecker.robot
Suite setup Run keywords
... Open accessibility test browser Maximize Browser Window
Suite teardown Close all browsers
*** Test Cases ***
Test pages
[Template] Check color contrast
http://www.plone.org/ contrast=6
*** Keywords ***
Check color contrast
[Arguments] ${url} ${contrast}=0
Should not exceed maximum color contrast issues ${url} ${contrast}
Should not exceed maximum color contrast issues
[Arguments] ${url} ${max}
${errors} = Count color contrast issues ${url}
Should be true ${errors} <= ${max}
... WCAG Contrast checker reported ${errors} issue for ${url}
Note
Currently all keywords are written as user keywords, but later they may be
refactored into Python-keywords. If this happens, there will be backwards
compatible wrappers available at contrastchecker.robot
.