Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AxeImpacts = map[string]int{
"minor": 1,
"moderate": 2,
"serious": 3,
"critical": 4,
}
AxeImpacts lists the violation impact categories in order of severity
Functions ¶
func AddAxeResult ¶ added in v1.9.0
func AddAxeResult(result *AxeResults)
AddAxeResult stores an AxeResults entry for output in the final report
func NewAxeReport ¶ added in v1.9.0
NewAxeReport creates and stores a new Axe report. This should only be called once per application run, as it creates a global Axe report.
Types ¶
type AxeNodeCheck ¶ added in v1.9.0
type AxeNodeCheck struct {
ID string `json:"id"`
Impact string `json:"impact"`
Message string `json:"message"`
Data interface{} `json:"data"`
RelatedNodes []AxeNodeRelatedNodes `json:"relatedNodes"`
}
AxeNodeCheck stores finding details for a specific DOM node.
type AxeNodeRelatedNodes ¶ added in v1.9.0
AxeNodeRelatedNodes relates a node's finding to other nodes involved in that finding (e.g. nodes that share a duplicate ID).
type AxeNodes ¶ added in v1.9.0
type AxeNodes struct {
HTML string `json:"html"`
Impact string `json:"impact"`
Target []interface{} `json:"target"`
FailureSummary string `json:"failureSummary"`
Any []AxeNodeCheck `json:"any"`
All []AxeNodeCheck `json:"all"`
None []AxeNodeCheck `json:"none"`
}
AxeNodes stores the findings of a rule and relates these findings to DOM nodes on a page.
func (*AxeNodes) GetPrettyFailureSummary ¶ added in v1.9.0
GetPrettyFailureSummary returns a "prettified" version of the failure summary
type AxeReport ¶ added in v1.9.0
type AxeReport struct {
ProjectName string `json:"projectName"`
OS string `json:"os"`
AppVersion string `json:"appVersion"`
Timestamp string `json:"timestamp"`
Environment string `json:"environment"`
Browser string `json:"browser"`
RuleSets []string `json:"ruleSets"`
ImpactThreshold string `json:"impactThreshold"`
AxeVersion string `json:"axeVersion"`
AxeScans []*AxeResults `json:"scans"`
ViolationsCount int `json:"violationsCount"`
IncompleteCount int `json:"incompleteCount"`
MinorCount int `json:"minorCount"`
ModerateCount int `json:"moderateCount"`
SeriousCount int `json:"seriousCount"`
CriticalCount int `json:"criticalCount"`
}
AxeReport encapsulates details of all Axe scans for a Kosher session
var Axe *AxeReport
Axe is the report structure that contains the summary and results of all Axe scans from the current session
type AxeResults ¶ added in v1.9.0
type AxeResults struct {
Title string `json:"title"`
TestEngine *AxeTestEngine `json:"testEngine"`
TestEnvironment *AxeTestEnvironment `json:"testEnvironment"`
ToolOptions *AxeToolOptions `json:"toolOptions"`
URL string `json:"url"`
Timestamp string `json:"timestamp"`
Violations []AxeRuleFindings `json:"violations"`
Incomplete []AxeRuleFindings `json:"incomplete"`
MinorCount int `json:"minorCount"`
ModerateCount int `json:"moderateCount"`
SeriousCount int `json:"seriousCount"`
CriticalCount int `json:"criticalCount"`
IncompleteCount int `json:"incompleteCount"`
}
AxeResults is the top-level results object returned by a call to axe.run(...)
type AxeRuleFindings ¶ added in v1.9.0
type AxeRuleFindings struct {
Description string `json:"description"`
Help string `json:"help"`
HelpURL string `json:"helpUrl"`
ID string `json:"id"`
Impact string `json:"impact"`
Tags []string `json:"tags"`
Nodes []AxeNodes `json:"nodes"`
}
AxeRuleFindings stores the rule details and findings for each rule executed against the page.
type AxeRunOnly ¶ added in v1.9.0
AxeRunOnly stores limits set on the rule sets applied for the test
type AxeTestEngine ¶ added in v1.9.0
AxeTestEngine stores metadata about the version of the axe-core API used
type AxeTestEnvironment ¶ added in v1.9.0
type AxeTestEnvironment struct {
OrientationAngle int `json:"orientationAngle"`
OrientationType string `json:"orientationType"`
UserAgent string `json:"userAgent"`
WindowHeight int `json:"windowHeight"`
WindowWidth int `json:"windowWidth"`
}
AxeTestEnvironment stores metadata about the browser and screen size used during testing
type AxeToolOptions ¶ added in v1.9.0
type AxeToolOptions struct {
RunOnly *AxeRunOnly `json:"runOnly"`
}
AxeToolOptions stores options and settings passed to Axe for the test run