dom

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package dom contains shared HTML tree rules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessibleSVGLabel

func AccessibleSVGLabel(n *html.Node) string

AccessibleSVGLabel returns the concise label for an SVG that may be handled as an opaque image. Hidden reports all SVG as hidden so generic DOM walkers never descend into SVG text, links, or metadata; callers that explicitly support this representation may use this function before their hidden check.

func Hidden

func Hidden(n *html.Node) bool

Hidden reports whether an element and its subtree must not appear in output.

func HiddenExceptARIA

func HiddenExceptARIA(n *html.Node) bool

HiddenExceptARIA reports hidden content while allowing only aria-hidden to be ignored. Math renderers commonly mark their visual glyph branch aria-hidden because an accessible branch is present alongside it. Callers using this exception must still reject non-content elements, CSS-hidden content, hidden/inert subtrees, and modal UI.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL