Accessibility Checks
Wrap accessibility scan results in a LoadStrike scenario so violations become a run result, report row, and CI-friendly pass or fail outcome.
Matching docs
Search across docs titles, summaries, groups, and section headings.
Use Up and Down Arrow to move through results, then press Enter to open the active page.
No indexed docs matched that search. Try a broader term or open the docs hub.
Use this page when
Visual guide
Guide
Options
Set Url to the page or journey target, Standard to the accessibility profile you want to label in the test, Tags to pass rule groups to your checker, IncludeSelectors to focus the scan on important page regions, and ExcludeSelectors to ignore known non-product regions such as third-party widgets or consent banners.
Quality Budgets
Set MaxViolations, MaxCriticalViolations, and MaxSeriousViolations to define the pass or fail budget. A scenario fails when the returned result exceeds any configured limit. Use a total budget for broad regressions and impact budgets when high-severity issues must fail independently.
Result Shape
Return a LoadStrikeAccessibilityResult with the evaluated URL and the violations reported by your checker. Each violation can carry rule id, impact, description, help URL, and target selectors. LoadStrike counts critical, serious, moderate, and minor impacts from that result.
Single Check Or Load
The generated scenario disables warmup and does not add a load profile by default. Add WithLoadSimulations only when the same accessibility check should be repeated during a load run.
Reports And Automation
Because the check is a normal scenario, it works with runner keys, report formats, portal reporting, realtime sinks, thresholds around the run, and CI pass or fail handling.
Feature usage samples
Use this pattern when your browser automation, axe runner, Lighthouse job, or internal checker already has the scan result and LoadStrike should own the budget evaluation, reporting, and CI result.
If you run these examples locally, add a valid runner key before execution starts. Set it with WithRunnerKey("...") or the config key LoadStrike:RunnerKey.
Accessibility Check
using LoadStrike;
var options = new LoadStrikeAccessibilityOptions
{
Url = "https://example.com/checkout",
Standard = "WCAG2AA",
MaxViolations = 2,
MaxCriticalViolations = 0,
MaxSeriousViolations = 1,
Tags = new[] { "wcag2a", "wcag2aa", "best-practice" },
IncludeSelectors = new[] { "main", "#checkout-form" },
ExcludeSelectors = new[] { ".cookie-banner", "[data-testid='support-widget']" }
};
var scenario = LoadStrikeAccessibility.CreateScenario(
"checkout-accessibility",
options,
_ => new LoadStrikeAccessibilityResult
{
Url = options.Url,
Violations = new[]
{
new LoadStrikeAccessibilityViolation
{
RuleId = "color-contrast",
Impact = "serious",
Description = "Text must meet contrast requirements.",
HelpUrl = "https://dequeuniversity.com/rules/axe/4.10/color-contrast",
Targets = new[] { ".payment-summary .total" }
}
}
});
_ = scenario;
package main
import loadstrike "loadstrike.com/sdk/go"
func main() {
scenario := loadstrike.LoadStrikeAccessibility.CreateScenario(
"checkout-accessibility",
loadstrike.LoadStrikeAccessibilityOptions{
URL: "https://example.com/checkout",
Standard: "WCAG2AA",
MaxViolations: 2,
MaxCriticalViolations: 0,
MaxSeriousViolations: 1,
Tags: []string{"wcag2a", "wcag2aa", "best-practice"},
IncludeSelectors: []string{"main", "#checkout-form"},
ExcludeSelectors: []string{".cookie-banner", "[data-testid='support-widget']"},
},
func(context loadstrike.LoadStrikeAccessibilityCheckContext) (loadstrike.LoadStrikeAccessibilityResult, error) {
return loadstrike.LoadStrikeAccessibilityResult{
URL: context.Options.URL,
Violations: []loadstrike.LoadStrikeAccessibilityViolation{
{
RuleID: "color-contrast",
Impact: "serious",
Description: "Text must meet contrast requirements.",
HelpURL: "https://dequeuniversity.com/rules/axe/4.10/color-contrast",
Targets: []string{".payment-summary .total"},
},
},
}, nil
},
)
_ = scenario
}
import java.util.List;
import com.loadstrike.runtime.LoadStrikeAccessibility;
import com.loadstrike.runtime.LoadStrikeAccessibility.Options;
import com.loadstrike.runtime.LoadStrikeAccessibility.Result;
import com.loadstrike.runtime.LoadStrikeAccessibility.Violation;
var options = new Options();
options.url = "https://example.com/checkout";
options.standard = "WCAG2AA";
options.maxViolations = 2;
options.maxCriticalViolations = 0;
options.maxSeriousViolations = 1;
options.tags = List.of("wcag2a", "wcag2aa", "best-practice");
options.includeSelectors = List.of("main", "#checkout-form");
options.excludeSelectors = List.of(".cookie-banner", "[data-testid='support-widget']");
var scenario = LoadStrikeAccessibility.createScenario("checkout-accessibility", options, context -> {
var violation = new Violation();
violation.ruleId = "color-contrast";
violation.impact = "serious";
violation.description = "Text must meet contrast requirements.";
violation.helpUrl = "https://dequeuniversity.com/rules/axe/4.10/color-contrast";
violation.targets = List.of(".payment-summary .total");
var result = new Result();
result.url = options.url;
result.violations = List.of(violation);
return result;
});
from loadstrike_sdk import (
LoadStrikeAccessibility,
LoadStrikeAccessibilityOptions,
LoadStrikeAccessibilityResult,
LoadStrikeAccessibilityViolation,
)
options = LoadStrikeAccessibilityOptions(
url="https://example.com/checkout",
standard="WCAG2AA",
max_violations=2,
max_critical_violations=0,
max_serious_violations=1,
tags=["wcag2a", "wcag2aa", "best-practice"],
include_selectors=["main", "#checkout-form"],
exclude_selectors=[".cookie-banner", "[data-testid='support-widget']"],
)
scenario = LoadStrikeAccessibility.create_scenario(
"checkout-accessibility",
options,
lambda context: LoadStrikeAccessibilityResult(
url=context.options.url,
violations=[
LoadStrikeAccessibilityViolation(
rule_id="color-contrast",
impact="serious",
description="Text must meet contrast requirements.",
help_url="https://dequeuniversity.com/rules/axe/4.10/color-contrast",
targets=[".payment-summary .total"],
)
],
),
)
import { LoadStrikeAccessibility } from "@loadstrike/loadstrike-sdk";
const scenario = LoadStrikeAccessibility.createScenario(
"checkout-accessibility",
{
url: "https://example.com/checkout",
standard: "WCAG2AA",
maxViolations: 2,
maxCriticalViolations: 0,
maxSeriousViolations: 1,
tags: ["wcag2a", "wcag2aa", "best-practice"],
includeSelectors: ["main", "#checkout-form"],
excludeSelectors: [".cookie-banner", "[data-testid='support-widget']"]
},
async ({ options }) => ({
url: options.url,
violations: [
{
ruleId: "color-contrast",
impact: "serious",
description: "Text must meet contrast requirements.",
helpUrl: "https://dequeuniversity.com/rules/axe/4.10/color-contrast",
targets: [".payment-summary .total"]
}
]
})
);
void scenario;
const { LoadStrikeAccessibility } = require("@loadstrike/loadstrike-sdk");
const scenario = LoadStrikeAccessibility.createScenario(
"checkout-accessibility",
{
url: "https://example.com/checkout",
standard: "WCAG2AA",
maxViolations: 2,
maxCriticalViolations: 0,
maxSeriousViolations: 1,
tags: ["wcag2a", "wcag2aa", "best-practice"],
includeSelectors: ["main", "#checkout-form"],
excludeSelectors: [".cookie-banner", "[data-testid='support-widget']"]
},
async ({ options }) => ({
url: options.url,
violations: [
{
ruleId: "color-contrast",
impact: "serious",
description: "Text must meet contrast requirements.",
helpUrl: "https://dequeuniversity.com/rules/axe/4.10/color-contrast",
targets: [".payment-summary .total"]
}
]
})
);
void scenario;
Accessibility options and result fields
The page or browser journey target. It must be an absolute URL.
The accessibility profile label for the check, such as WCAG2AA, WCAG2A, WCAG21AA, or the naming convention your checker uses.
Rule groups to pass to your scanner, commonly WCAG tags, best-practice tags, or project-specific rule groups.
CSS selectors for the page regions that should be checked, such as main content, checkout forms, account panels, or authenticated app shells.
CSS selectors for regions that should not fail the product check, such as cookie banners, third-party widgets, or known external embeds.
Fails the scenario if the total returned violation count is higher than this limit.
MaxCriticalViolations and MaxSeriousViolations fail independently from the total count.
Each violation can include RuleId, Impact, Description, HelpUrl, and Targets so report readers know what failed and where.
LoadStrike evaluates the returned result. Your callback decides how to run the browser, authenticate, collect rule results, and map them into the LoadStrike result shape.