Documentation
¶
Index ¶
- func Lint(report *Report, node *html.Node, pathname string)
- func LintAName(report *Report, node *html.Node, pathname string)
- func LintAltText(report *Report, node *html.Node, pathname string)
- func LintCurlyQuotes(report *Report, node *html.Node, pathname string)
- func LintFigureHasFigcaption(report *Report, node *html.Node, pathname string)
- func LintImgNestedInFigure(report *Report, node *html.Node, pathname string)
- func LintLazyLoading(report *Report, node *html.Node, pathname string)
- func LintNesting(report *Report, reader io.Reader, pathname string)
- func LintTimeFormatting(report *Report, node *html.Node, pathname string)
- func LintWidthAndHeight(report *Report, node *html.Node, pathname string)
- type Report
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LintAName ¶
LintAName ensures that <a> does not have the name attribute (which is deprecated in favor of id).
func LintAltText ¶
LintAltText ensures that <img> has an alt attribute for accessibility.
func LintCurlyQuotes ¶
LintCurlyQuotes ensures that non-code text nodes, alt attributes, and title attributes use curly quotes.
func LintFigureHasFigcaption ¶
LintFigureHasFigcaption ensures that <figure> has a <figcaption> child.
func LintImgNestedInFigure ¶
LintImgNestedInFigure ensures that <img> is nested inside a <figure> parent.
func LintLazyLoading ¶
LintLazyLoading ensures that <img> and <iframe> have loading=lazy and that <script> has type=module. These attributes improve loading and rendering performance; see https://developer.mozilla.org/en-US/docs/Web/Performance/Lazy_loading.
func LintNesting ¶
LintNesting ensures that all tags are properly closed.
func LintTimeFormatting ¶
LintTimeFormatting ensures that <time> elements are correctly formatted.