Documentation
¶
Overview ¶
Package check implements the check registry and individual site audit checks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type A11yAdvancedCheck ¶
type A11yAdvancedCheck struct{}
A11yAdvancedCheck implements WCAG 2.1/2.2 rules beyond basics: ARIA validation, focus management, landmark completeness, color contrast hints.
type A11yCheck ¶
type A11yCheck struct{}
A11yCheck detects accessibility violations: missing alt text, ARIA issues, heading hierarchy problems, and missing landmarks.
type AIReadyCheck ¶
type AIReadyCheck struct{}
AIReadyCheck verifies that a site is AI-agent-friendly by checking for emerging standards and best practices that help LLMs and AI agents understand and navigate the site effectively.
Checks performed:
- /llms.txt endpoint (emerging standard for LLM-readable site descriptions)
- <link rel="alternate" type="text/markdown"> for markdown alternatives
- Structured data (JSON-LD, microdata)
- Clean semantic HTML (proper heading hierarchy, landmarks)
- Sitemap.xml accessibility
func (*AIReadyCheck) Name ¶
func (a *AIReadyCheck) Name() string
type Finding ¶
type Finding struct {
Severity Severity
URL string
Element string
Message string
Fix string
Evidence string
}
Finding is an internal finding produced by a check.
type FormsCheck ¶
type FormsCheck struct{}
FormsCheck detects form-related issues: missing actions, CSRF tokens, method problems.
func (*FormsCheck) Name ¶
func (f *FormsCheck) Name() string
type LinksCheck ¶
type LinksCheck struct {
// AcceptedStatusCodes is the set of HTTP status codes considered acceptable.
// If empty, defaults to 200-399.
AcceptedStatusCodes []int
}
LinksCheck detects broken links, redirect chains, and dead anchors.
func (*LinksCheck) Name ¶
func (l *LinksCheck) Name() string
type PerfCheck ¶
type PerfCheck struct{}
PerfCheck detects performance issues: large resources, render-blocking scripts, missing compression, excessive DOM size.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds all registered checks.
func DefaultRegistry ¶
func DefaultRegistry() *Registry
DefaultRegistry returns a registry with all built-in checks.
type SEOCheck ¶
type SEOCheck struct{}
SEOCheck detects SEO issues: missing meta tags, duplicate titles, missing canonical URLs, and robots directives.
type SRICheck ¶
type SRICheck struct{}
SRICheck validates that cross-origin scripts and stylesheets have Subresource Integrity (SRI) attributes with strong hashes.
type SecurityCheck ¶
type SecurityCheck struct{}
SecurityCheck detects missing security headers, mixed content, and exposed secrets.
func (*SecurityCheck) Name ¶
func (s *SecurityCheck) Name() string