AccessibilityProperties Class

The properties that the accessibility tree of a browser exposes for an element: its role, its accessible name and description, and its states. The values are computed when the instance is created: they do not follow the later changes of the document.

public sealed class AccessibilityProperties

Properties

NameDescription
CheckedThe checked state (https://w3c.github.io/aria/#aria-checked) of a checkbox, a radio button, a switch, or a checkable menu item, option or tree item: the native state of an input (an indeterminate checkbox is AccessibilityCheckedState.Mixed), else aria-checked. null when the role has no checked state.
DescriptionThe accessible description (https://w3c.github.io/accname/#dfn-accessible-description): the text of the elements referenced by aria-describedby, else aria-description, else the title attribute when it is not the accessible name. The empty string when the element has no description.
DisabledWhether the element is disabled: a disabled form control (including by a disabled fieldset, optgroup or select), or aria-disabled="true" on the element or one of its ancestors.
ExpandedThe expanded state of a button, a link, a combobox, a tab, a row or a tree item (aria-expanded, https://w3c.github.io/aria/#aria-expanded). null when the element is not expandable.
IsHiddenWhether the element is excluded from the accessibility tree: it is not rendered (display: none, visibility: hidden) or it is in a subtree with aria-hidden="true".
LevelThe hierarchical level (https://w3c.github.io/aria/#aria-level) of a heading, a list item, a row or a tree item: aria-level, else the computed heading level of an h1-h6 element, which takes the headingoffset and headingreset attributes of its ancestors into account, else 2 for an element with role="heading". null when the element has no level.
NameThe accessible name (https://w3c.github.io/accname/), as Element.ComputedName. For a text node, the text.
PressedThe pressed state of a toggle button (aria-pressed, https://w3c.github.io/aria/#aria-pressed). null when the element is not a toggle button.
RoleThe role, with the values of Element.ComputedRole (e.g. button, heading, generic, none). The text of an AccessibilityNode has the role text.
SelectedThe selected state of an option, a tab, a row or a cell (aria-selected, or the selectedness of an option). null when the role has no selected state.

The checked state (https://w3c.github.io/aria/#aria-checked) of a checkbox, a radio button, a switch, or a checkable menu item, option or tree item: the native state of an input (an indeterminate checkbox is AccessibilityCheckedState.Mixed), else aria-checked. null when the role has no checked state.

public AccessibilityCheckedState? Checked { get; }

The accessible description (https://w3c.github.io/accname/#dfn-accessible-description): the text of the elements referenced by aria-describedby, else aria-description, else the title attribute when it is not the accessible name. The empty string when the element has no description.

public string Description { get; }

Property value

string

Whether the element is disabled: a disabled form control (including by a disabled fieldset, optgroup or select), or aria-disabled="true" on the element or one of its ancestors.

public bool Disabled { get; }

Property value

bool

The expanded state of a button, a link, a combobox, a tab, a row or a tree item (aria-expanded, https://w3c.github.io/aria/#aria-expanded). null when the element is not expandable.

public bool? Expanded { get; }

Property value

bool?

Whether the element is excluded from the accessibility tree: it is not rendered (display: none, visibility: hidden) or it is in a subtree with aria-hidden="true".

public bool IsHidden { get; }

Property value

bool

The hierarchical level (https://w3c.github.io/aria/#aria-level) of a heading, a list item, a row or a tree item: aria-level, else the computed heading level of an h1-h6 element, which takes the headingoffset and headingreset attributes of its ancestors into account, else 2 for an element with role="heading". null when the element has no level.

public int? Level { get; }

Property value

int?

The accessible name (https://w3c.github.io/accname/), as Element.ComputedName. For a text node, the text.

public string Name { get; }

Property value

string

The pressed state of a toggle button (aria-pressed, https://w3c.github.io/aria/#aria-pressed). null when the element is not a toggle button.

public AccessibilityCheckedState? Pressed { get; }

The role, with the values of Element.ComputedRole (e.g. button, heading, generic, none). The text of an AccessibilityNode has the role text.

public string Role { get; }

Property value

string

The selected state of an option, a tab, a row or a cell (aria-selected, or the selectedness of an option). null when the role has no selected state.

public bool? Selected { get; }

Property value

bool?