Repository navigation
Closed as not planned
Description
We should improve the accessibility of the HTML report files (log.html and report.html).
These reports should be better accessible and also be properly readable by screen readers, for example.
Analyzing accessibility issues can be done with Axe for example (there are plugins for Chrome and also for testing frameworks); note that accessibility tools only get around 50% of accessibility issues.
Example of code to validate report.html and log.html files, considering just "critical" and "serious" issues as reported by Axe.
"moderate" impacts should perhaps also be considered.
from selenium import webdriver
from axe_selenium_python import Axe
import json
def test_html_report():
driver = webdriver.Firefox()
#driver.get("http://www.google.com")
driver.get("file:////Users/smsf/exps/robot40_outputxml_changes/report.html")
axe = Axe(driver)
# Inject axe-core javascript into page.
axe.inject()
# Run axe accessibility checks.
results = axe.run()
# Assert no violations are found
violations = [v for v in results['violations'] if v['impact'] in ['critical', 'serious']]
assert len(violations) == 0, axe.report(violations)
driver.close()
def test_html_log():
driver = webdriver.Firefox()
#driver.get("http://www.google.com")
driver.get("file:////Users/smsf/exps/robot40_outputxml_changes/log.html")
axe = Axe(driver)
# Inject axe-core javascript into page.
axe.inject()
# Run axe accessibility checks.
results = axe.run()
# Assert no violations are found
violations = [v for v in results['violations'] if v['impact'] in ['critical', 'serious']]
#print(json.dumps(violations))
assert len(violations) == 0, axe.report(violations)
driver.close()Metadata
Metadata
Assignees
Labels
No labels
Activity
pekkaklarck commentedon May 31, 2023
Yes, log and report accessibility should be enhanced. We are planning to recreate them using some more modern tech and this should be taken into account then. We are going to start from Libdoc and have #4304 about that. Let's merge this issue with it.