Scroll to navigation

tk(accessible) Tk tk(accessible)


NAME

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

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

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


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

The following operations are available for the tk accessible command:

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.
Short label identifying the widget. Defaults to the accessibility role.
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.
Sets the widget's accessibility value. For instance, with a scale widget, will return the current numeric value of the scale.
Sets the widget's accessibility state, from one of the standard Tk widget states.
Sets the command associated with the widget, if any.
String providing additional information on the widget and its purpose. For instance, can provide details on specific keyboard navigation for the widget.
Returns the widget's accessibility role.
Returns the widget's accessibility name.
Returns the widget's accessibility description.
Returns the widget's accessibility value.
Returns the widget's accessibility state.
Returns the widget's accessibility action.
Returns the widget's accessibility help.
Registers the widget with the platform's accessibility API and enables accessibility for the widget.
Notifies the system when selection, value or other data associated with the widget changes.
Notifies the accessibility system when focus changes.
Checks to see if the system is running a screen reader or other accessibility process.

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

widget, tk

n