Tungsten v0.1.0 Tungsten.CDP.Accessibility View Source

Accessibility

This domain has no documentation

Link to this section Summary

Link to this section Types

Link to this type

cdp_ax_node_id_type() View Source
cdp_ax_node_id_type() :: String.t()

Accessibility.AXNodeId

Unique accessibility node identifier.

Link to this type

cdp_ax_node_type() View Source
cdp_ax_node_type() :: %{
  :node_id => cdp_ax_node_id_type(),
  :ignored => boolean(),
  optional(:ignored_reasons) => [cdp_ax_property_type()],
  optional(:role) => cdp_ax_value_type(),
  optional(:name) => cdp_ax_value_type(),
  optional(:description) => cdp_ax_value_type(),
  optional(:value) => cdp_ax_value_type(),
  optional(:properties) => [cdp_ax_property_type()],
  optional(:child_ids) => [cdp_ax_node_id_type()],
  optional(:backend_dom_node_id) => Tungsten.CDP.DOM.cdp_backend_node_id_type()
}

Accessibility.AXNode

A node in the accessibility tree.

Link to this type

cdp_ax_property_name_type() View Source
cdp_ax_property_name_type() ::
  :owns
  | :labelledby
  | :flowto
  | :errormessage
  | :details
  | :describedby
  | :controls
  | :activedescendant
  | :selected
  | :pressed
  | :modal
  | :expanded
  | :checked
  | :valuetext
  | :valuemax
  | :valuemin
  | :required
  | :readonly
  | :multiline
  | :orientation
  | :multiselectable
  | :level
  | :has_popup
  | :autocomplete
  | :root
  | :relevant
  | :atomic
  | :live
  | :roledescription
  | :settable
  | :keyshortcuts
  | :invalid
  | :hidden_root
  | :hidden
  | :focused
  | :focusable
  | :editable
  | :disabled
  | :busy

Accessibility.AXPropertyName

Values of AXProperty name:

  • from 'busy' to 'roledescription': states which apply to every AX node
  • from 'live' to 'root': attributes which apply to nodes in live regions
  • from 'autocomplete' to 'valuetext': attributes which apply to widgets
  • from 'checked' to 'selected': states which apply to widgets
  • from 'activedescendant' to 'owns' - relationships between elements other than parent/child/sibling.
Link to this type

cdp_ax_property_type() View Source
cdp_ax_property_type() :: %{
  name: cdp_ax_property_name_type(),
  value: cdp_ax_value_type()
}

Accessibility.AXProperty

This type has no documentation

Link to this type

cdp_ax_value_native_source_type_type() View Source
cdp_ax_value_native_source_type_type() ::
  :other
  | :title
  | :tablecaption
  | :legend
  | :labelwrapped
  | :labelfor
  | :label
  | :figcaption

Accessibility.AXValueNativeSourceType

Enum of possible native property sources (as a subtype of a particular AXValueSourceType).

Link to this type

cdp_ax_value_source_type() View Source
cdp_ax_value_source_type() :: %{
  :type => cdp_ax_value_source_type_type(),
  optional(:value) => cdp_ax_value_type(),
  optional(:attribute) => String.t(),
  optional(:attribute_value) => cdp_ax_value_type(),
  optional(:superseded) => boolean(),
  optional(:native_source) => cdp_ax_value_native_source_type_type(),
  optional(:native_source_value) => cdp_ax_value_type(),
  optional(:invalid) => boolean(),
  optional(:invalid_reason) => String.t()
}

Accessibility.AXValueSource

A single source for a computed AX property.

Link to this type

cdp_ax_value_source_type_type() View Source
cdp_ax_value_source_type_type() ::
  :related_element | :placeholder | :contents | :style | :implicit | :attribute

Accessibility.AXValueSourceType

Enum of possible property sources.

Link to this type

cdp_ax_value_type() View Source
cdp_ax_value_type() :: %{
  :type => cdp_ax_value_type_type(),
  optional(:value) => any(),
  optional(:related_nodes) => [cdp_ax_related_node_type()],
  optional(:sources) => [cdp_ax_value_source_type()]
}

Accessibility.AXValue

A single computed AX property.

Link to this type

cdp_ax_value_type_type() View Source
cdp_ax_value_type_type() ::
  :value_undefined
  | :internal_role
  | :role
  | :dom_relation
  | :token_list
  | :token
  | :computed_string
  | :string
  | :number
  | :node_list
  | :node
  | :integer
  | :idref_list
  | :idref
  | :boolean_or_undefined
  | :tristate
  | :boolean

Accessibility.AXValueType

Enum of possible property types.

Link to this section Functions

Link to this function

disable(session, parameters \\ %{}, options \\ []) View Source
disable(GenServer.server(), map(), Tungsten.Connection.exec_options()) ::
  {:ok, map()} | {:error, term()}

Accessibility.disable

Disables the accessibility domain.

Link to this function

enable(session, parameters \\ %{}, options \\ []) View Source
enable(GenServer.server(), map(), Tungsten.Connection.exec_options()) ::
  {:ok, map()} | {:error, term()}

Accessibility.enable

Enables the accessibility domain which causes AXNodeIds to remain consistent between method calls. This turns on accessibility for the page, which can impact performance until accessibility is disabled.

Link to this function

get_full_ax_tree(session, parameters \\ %{}, options \\ []) View Source
get_full_ax_tree(GenServer.server(), map(), Tungsten.Connection.exec_options()) ::
  {:ok, %{nodes: [cdp_ax_node_type()]}} | {:error, term()}

Accessibility.getFullAXTree

Fetches the entire accessibility tree

Link to this function

get_partial_ax_tree(session, parameters \\ %{}, options \\ []) View Source
get_partial_ax_tree(
  GenServer.server(),
  %{
    optional(:node_id) => Tungsten.CDP.DOM.cdp_node_id_type(),
    optional(:backend_node_id) => Tungsten.CDP.DOM.cdp_backend_node_id_type(),
    optional(:object_id) => Tungsten.CDP.Runtime.cdp_remote_object_id_type(),
    optional(:fetch_relatives) => boolean()
  },
  Tungsten.Connection.exec_options()
) :: {:ok, %{nodes: [cdp_ax_node_type()]}} | {:error, term()}

Accessibility.getPartialAXTree

Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.