Class: BBC::A11y::Linter
- Inherits:
-
Object
- Object
- BBC::A11y::Linter
- Defined in:
- lib/bbc/a11y/linter.rb
Instance Method Summary collapse
Instance Method Details
#lint(page_settings) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/bbc/a11y/linter.rb', line 5 def lint(page_settings) browser.visit page_settings.url browser.execute_script(BBC::A11y::Javascript.bundle) criteria = { skip: page_settings.skipped_standards, only: page_settings.only_standards }.to_json validation = browser.evaluate_script("a11y.validate(#{criteria})") LintResult.from_json(validation) end |