What is the use of AccessibleContext in Java Swing?

I have seen many examples that use getAccessibleContext (). SetAccessibleDescription (...)
to set some "magic" description.

What is the use of this description? Where can I see it and how should it maintain accessibility?

Why is setDescription (...) not used?

Also, what is your opinion / experience with Java accessibility stuff?

+7
java user-interface accessibility swing
source share
2 answers

I have not used the Swing accessibility features in my applications at all (and probably should), but I believe that this will help to use screen readers and other technologies that improve application accessibility.

From Availability and Swing Set :

If the application fully supports the Java Accessibility API, it can be compatible and friendly, screen readers, magnifiers and other types of assistive technologies.

The related article contains some depth about the Swing accessibility properties and the Accessibily API .

+3
source share

As indicated, the available information is used to provide information to assistive technologies such as screen readers (in short, as a user of a closed computer, I use a screen reader to collect useful information about what control has focus and other useful things happening in the application, and then for that, to say that to me .. Examples of screen readers are NVDA www.nvda-project.org for windows, Orca http://live.gnome.org/Orca for the gnome desktop on unix platforms and voice control enabled by silence in MacOSX). For a number of standard controls containing text, you can leave without explicitly indicating the available information (for example, if you have a button with the text word "OK", this will probably be well voiced by a screen reader. The importance of setting the available information arises when you don’t have text (for example, buttons with a graphic label) or when you are developing a custom control (from memory, without returning through some of the Java swing documents, I think that the available name should identify the control Appendices and an accessible description to provide additional information may be the key to use if it is a custom control).

Now, if you want to see how it works, NVDA and Orca are open source projects, and scoring is included in MacOSX 10.4 (I think) and higher, so you can try one of them for free (unlike some commercial offers that can be very expensive).

+1
source share

All Articles