Basics
Guides
API Reference
Basics
Guides
API Reference
[34:7] extends: object
An interface for describing UI elements for Assistive Technologies. Every
accessible implementation has: - a “role”, represented by a value of the
[enum@Gtk.AccessibleRole] enumeration - “attributes”, represented by a set of
[enum@Gtk.AccessibleState], [enum@Gtk.AccessibleProperty] and
[enum@Gtk.AccessibleRelation] values The role cannot be changed after
instantiating a GtkAccessible implementation. The attributes are updated
every time a UI element's state changes in a way that should be reflected by
assistive technologies. For instance, if a GtkWidget visibility changes,
the %GTK_ACCESSIBLE_STATE_HIDDEN state will also change to reflect the
[property@Gtk.Widget:visible] property. Every accessible implementation is
part of a tree of accessible objects. Normally, this tree corresponds to the
widget tree, but can be customized by reimplementing the
[vfunc@Gtk.Accessible.get_accessible_parent],
[vfunc@Gtk.Accessible.get_first_accessible_child] and
[vfunc@Gtk.Accessible.get_next_accessible_sibling] virtual functions. Note
that you can not create a top-level accessible object as of now, which means
that you must always have a parent accessible object. Also note that when an
accessible object does not correspond to a widget, and it has children, whose
implementation you don't control, it is necessary to ensure the correct shape
of the a11y tree by calling [method@Gtk.Accessible.set_accessible_parent] and
updating the sibling by
[method@Gtk.Accessible.update_next_accessible_sibling].
Accessible (Handle = null)
Creates a new
Accessibleby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setAccessiblerole (string Value)
The accessible role of the given
GtkAccessibleimplementation. The accessible role cannot be changed once set.
Value is the new property value.None.announce (string message, string priority)
Requests the user's screen reader to announce the given message. This kind of notification is useful for messages that either have only a visual representation or that are not exposed visually at all, e.g. a notification about a successful operation. Also, by using this API, you can ensure that the message does not interrupts the user's current screen reader output.
message is the string to announce.priority is the priority of the announcement.None.get_accessible_id ()
Retrieves the accessible identifier for the accessible object. This functionality can be overridden by
GtkAccessibleimplementations. It is left to the accessible implementation to define the scope and uniqueness of the identifier.
get_accessible_parent ()
Retrieves the accessible parent for an accessible object. This function returns
NULLfor top level widgets.
get_accessible_role ()
Retrieves the accessible role of an accessible object.
get_at_context ()
Retrieves the implementation for the given accessible object.
get_first_accessible_child ()
Retrieves the first accessible child of an accessible object.
get_next_accessible_sibling ()
Retrieves the next accessible sibling of an accessible object
get_platform_state (string state)
Queries a platform state, such as focus. This functionality can be overridden by
GtkAccessibleimplementations, e.g. to get platform state from an ignored child widget, as is the case forGtkTextwrappers.
state is platform state to query.reset_property (string property)
Resets the accessible property to its default value.
property is the accessible property.None.reset_relation (string relation)
Resets the accessible relation to its default value.
relation is the accessible relation.None.reset_state (string state)
Resets the accessible state to its default value.
state is the accessible state.None.set_accessible_parent (object parent, object next_sibling)
Sets the parent and sibling of an accessible object. This function is meant to be used by accessible implementations that are not part of the widget hierarchy, and but act as a logical bridge between widgets. For instance, if a widget creates an object that holds metadata for each child, and you want that object to implement the
GtkAccessibleinterface, you will use this function to ensure that the parent of each child widget is the metadata object, and the parent of each metadata object is the container widget.
parent is the parent accessible object.next_sibling is the sibling accessible object.None.update_next_accessible_sibling (object new_sibling)
Updates the next accessible sibling. That might be useful when a new child of a custom accessible is created, and it needs to be linked to a previous child.
new_sibling is the new next accessible sibling to set.None.update_platform_state (string state)
Informs ATs that the platform state has changed. This function should be used by
GtkAccessibleimplementations that have a platform state but are not widgets. Widgets handle platform states automatically.
state is the platform state to update.None.[312:14] static extends: object
Generated metadata helpers for Accessible interface surfaces.
properties ()
Returns property metadata for
Accessible.
A list.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.