API Reference

Class

HtmlAccessibilitySemantics

Namespace OfficeIMO.Html
Assembly OfficeIMO.Html
Modifiers static

Resolves the small, deterministic subset of HTML and ARIA accessibility semantics used by OfficeIMO document conversion pipelines.

Inheritance

  • Object
  • HtmlAccessibilitySemantics

Methods

public static String GetAccessibleName(IElement element, Boolean includeTextFallback = false) #
Returns: String

Resolves an accessible name using ARIA labelling, host-language alternatives, optional element text, and title fallback. This does not mutate the DOM.

Parameters

element AngleSharp.Dom.IElement requiredposition: 0
Element to name.
includeTextFallback System.Boolean = false optionalposition: 1
Whether normalized descendant text may supply the name.
public static String GetImageAccessibleName(IElement element) #
Returns: String

Resolves an accessible image name, including image alt semantics for custom elements that a converter explicitly aliases to an image.

Parameters

element AngleSharp.Dom.IElement requiredposition: 0
public static Boolean HasEpubType(IElement element, String semanticType) #
Returns: Boolean

Returns whether an element declares the requested EPUB structural semantic.

Parameters

element AngleSharp.Dom.IElement requiredposition: 0
semanticType System.String requiredposition: 1
public static Boolean HasRole(IElement element, String role) #
Returns: Boolean

Returns whether an element declares the requested ARIA role.

Parameters

element AngleSharp.Dom.IElement requiredposition: 0
role System.String requiredposition: 1
public static Boolean IsAriaHidden(IElement element) #
Returns: Boolean

Returns whether an element is explicitly hidden from the accessibility tree.

Parameters

element AngleSharp.Dom.IElement requiredposition: 0
public static Boolean TryGetHeadingLevel(IElement element, out Int32 level) #
Returns: Boolean

Resolves a heading level from a native heading element or an ARIA heading role. ARIA levels outside the Markdown heading range are clamped to levels 1 through 6.

Parameters

element AngleSharp.Dom.IElement requiredposition: 0
level System.Int32@ requiredposition: 1