tk(accessible) Tk tk(accessible)

```

```

# [NAME](#NAME)

accessible - Adds screenreader support for core Tk and ttk widgets.

# [SYNOPSIS](#SYNOPSIS)

```
tk accessible set_acc_role window value
tk accessible set_acc_name window value
tk accessible set_acc_description window value
tk accessible set_acc_value window value
tk accessible set_acc_state window value
tk accessible set_acc_action window value
tk accessible set_acc_help window value
tk accessible get_acc_role window 
tk accessible get_acc_name window
tk accessible get_acc_description window
tk accessible get_acc_value window 
tk accessible get_acc_state window
tk accessible get_acc_action window 
tk accessible get_acc_help window
tk accessible add_acc_object window
tk accessible emit_selection_change window
tk accessible emit_focus_change window
tk accessible check_screenreader
```

```

```

# [DESCRIPTION](#DESCRIPTION)

The **tk accessible** command makes core Tk and ttk widgets accessible to a screen reader.

```

```

# [INTRODUCTION](#INTRODUCTION)

All major computing platforms provide one or more API's to make GUI applications accessible to visually-impaired users who work using screen reader tools. Screen readers provide auditory feedback to users of a GUI application, and may provide additional or alternative methods to navigating GUI's apart from standard keyboard navigation. The **tk accessible** command layers a platform neutral API on top of platform-specific API's to support accessibility on Linux/Unix, macOS, and Windows.

The **tk accessible** command is intended to provide a basic accessible-out-of-the-box experience for end users and requires little additional work by developers. If a screen reader is in operation, Tcl/Tk applications will be accessible. The **tk accessible** command set does allow for additional customization on the part of developers. And widgets that are not part of the core Tk widget set can enable accessibility by using the tk accessible command set to specific the accessible role, name, description, value, state (if applicable), and action (if applicable).

# [OPERATIONS](#OPERATIONS)

The following operations are available for the **tk accessible** command:

[**tk accessible set\_acc\_role window value**](#tk)

Assigns one of the following accessibility roles to a Tk widget: Button, Canvas, Checkbutton, Combobox, Entry, Label, Listbox, Menu, Notebook, Progressbar, Scale, Scrollbar, Spinbox, Table, Text, and Tree. Tk and ttk widgets having similar roles, such as a button and a ttk::button, will both be assigned the same accessibility role as these widgets are the same from an accessibility standpoint.

[**tk accessible set\_acc\_name window value**](#tk~2)

Short label identifying the widget. Defaults to the accessibility role.

[**tk accessible set\_acc\_description window value**](#tk~3)

Longer string providing additional detail about the widget. Depending on the widget, may default to returning the widget's -text option or some similar detail.

[**tk accessible set\_acc\_value window value**](#tk~4)

Sets the widget's accessibility value. For instance, with a scale widget, will return the current numeric value of the scale.

[**tk accessible set\_acc\_state window value**](#tk~5)

Sets the widget's accessibility state, from one of the standard Tk widget states.

[**tk accessible set\_acc\_action window value**](#tk~6)

Sets the command associated with the widget, if any.

[**tk accessible set\_acc\_help window value**](#tk~7)

String providing additional information on the widget and its purpose. For instance, can provide details on specific keyboard navigation for the widget.

[**tk accessible get\_acc\_role window**](#tk~8)

Returns the widget's accessibility role.

[**tk accessible get\_acc\_name window**](#tk~9)

Returns the widget's accessibility name.

[**tk accessible get\_acc\_description window**](#tk~10)

Returns the widget's accessibility description.

[**tk accessible get\_acc\_value window**](#tk~11)

Returns the widget's accessibility value.

[**tk accessible get\_acc\_state window**](#tk~12)

Returns the widget's accessibility state.

[**tk accessible get\_acc\_action window**](#tk~13)

Returns the widget's accessibility action.

[**tk accessible get\_acc\_help window**](#tk~14)

Returns the widget's accessibility help.

[**tk accessible add\_acc\_object window**](#tk~15)

Registers the widget with the platform's accessibility API and enables accessibility for the widget.

[**tk accessible emit\_selection\_change window**](#tk~16)

Notifies the system when selection, value or other data associated with the widget changes.

[**tk accessible emit\_focus\_change window**](#tk~17)

Notifies the accessibility system when focus changes.

[**tk accessible check\_screenreader**](#tk~18)

Checks to see if the system is running a screen reader or other accessibility process.

# [ADDITIONAL NOTES](#ADDITIONAL_NOTES)

Some Tk GUI components, such as frames and panedwindows, are not included in the accessibility API because they are just containers and do not handle actions or data. Also, the canvas is not included in the accessibility API because it is a purely visual widget; the HTML5 canvas widget is not accessible to web API's for the same reason. Developers may choose to provide alternative data to provide information on the canvas widget, such as labels or help text. Finally, accessibility only runs in the main Tk interpreter, because of potential conflicts in child interpreters; also, accessibility is not supported under XQuartz (the X11 environment on macOS) because of too many conflicts between the X11 and macOS versions of accessibility.

# [KEYWORDS](#KEYWORDS)

widget, tk

n

---

Document: accessible(n) from tk 9.1.0-r0 (Chainguard OS)
Source: https://downloads.sourceforge.net/sourceforge/tcl/tk9.1.0-src.tar.gz
