Community
Participate
Working Groups
I have an eclipse page that I wish to put some warning information. For decorative purposes I would like to prepend the text with an icon. I create a Composite and within it use a Label to embed the image, and use a read only Text field for the warning information so that the JAWS screen reader can read the information. Here's a snippet of code that I am using: Composite composite = new Composite(body, SWT.NONE); composite.setLayout(GridLayoutFactory.fillDefaults().numColumns(2).create()); composite.setLayoutData(GridDataFactory.fillDefaults().span(2, 1).create()); Label imageLabel = new Label(composite, SWT.WRAP); imageLabel.setImage(getDefaultImage()); imageLabel.getAccessible().addAccessibleListener(new AccessibleAdapter() { @Override public void getName(AccessibleEvent e) { e.result="Default image icon"; }}); Text testLabel = new Text(composite, SWT.WRAP|SWT.READ_ONLY); testLabel.setLayoutData(GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, false).hint(250,SWT.DEFAULT).create()); testLabel.setText("This is some sample text for JAWS to read."); Since the image is embedded in a Label and the Label preceded the Text object, I believe there is internal code in eclipse to associate the Label to the Text object or it's JAWS that is doing the association. Due to the association, JAWS tries to read the image label. I would like JAWS to read it as the accessible name that I set it to (Default image icon), but some how it is not reading the accessible name and it's reading some random name assigned to the graphic (ie. graphic123). I've noticed this in some of the base Eclipse wizard pages as well. If you check out a sample Wizard, when there is an error message, an icon is associated with the error and the icon is read as "graphicXXX". The text next to the graphic is read fine, but the way the graphic is read is really meaningless and would be confusing to blind users and therefore fail accessibility for our product, based on IBM guidelines. Attached is a sample plugin that depicts the problem above in an editor. Also according the following article, I believe my code is pretty much as suggested. http://www.eclipse.org/articles/article.php?file=Article-Accessibility/index.html
Created attachment 129903 [details] Sample plugin with the accessibility issue
I don't know how to install & run the plug-in because it is not a java project. Would it be possible for you to provide a standalone SWT snippet instead? For example: http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet164.java If you have never written an SWT snippet before, this link might help: http://www.eclipse.org/swt/snippets/ Thanks!
Instructions for installing the plugin: 1. Unzip the zip file provided in the attachment. 2. Launch Eclipse 3.4.x 3. Click on the Help menu bar -> Software Updates... 4. Under the Available Software tab, click on the Add Site... button. 5. Click on the Local... button and browse to the "AccessibilitySamplesUpdateSite" directory where you unzipped the file in step 1. Hit OK to add the site. 6. Remaining in the Available Software tab, click on the checkbox for the site that was just added, and click the Install... button. Follow the steps to install. It should restart your workbench. 7. Upon restart, create a Project by selecting the File menu -> New -> Project. In the dialog select to create a Project from the General folder. Go through the create Project wizard. You will need to provide a project name. I used Sample1. 8. Once you are returned to the main workbench window, select the project in the Package Explorer, right click and create a new file. Follow the wizard to create a new file. Name the file acc_test.xml. 9. Once you are returned to the main workbench window, select the file acc_test.xml, right click and choose Open With. You should see an Accessibility Samples Editor option. If so then select it and it will take you to a window, similar to the screenshot below. If you don't see the editor option, choose Other, and you should be taken to a dialog that has the Accessibility Samples Editor. If you still don't see it, then you probably do not have the plugin installed correctly. Please contact me if this is the case.
Created attachment 129976 [details] Sample java file
I tried installing as a Software Update, as you suggested, and it seems to want something from file:/E:/SAT/Development/workspace_32/AccessibilitySamplesUpdateSite/ - metadata which, of course, I don't have. This is with Eclipse 3.5 by the way. I also tried the Sample java file (is it supposed to run standalone?), and as yet I can't get it to compile - I guess I need a ton more stuff in my workspace (I guess I usually just have SWT, and maybe JFace, and maybe ui.workbench. I'll try again another day when I have more time. In the meantime, if you happen to have a minute to create an SWT snippet, that would ensure that I look at your problem sooner.
Created attachment 129987 [details] Assessibility snippet
Created attachment 129988 [details] Image for snippet
Thanks, Hiren. Sorry it took so long to run the test case - I appreciate your perseverance. I recognize the bug now - it is very old. I am going to mark this bug as a duplicate of an old bug, however I am going to ping the screen reader folks one more time on this - they should be able to look for the MSAA name of a graphic label. I will let you know what happens. https://bugs.eclipse.org/bugs/show_bug.cgi?id=21771#c19 *** This bug has been marked as a duplicate of bug 21771 ***
Created attachment 130008 [details] Accessibility snippet with a Button.
Thanks for your quick reply. I saw the old bug report which claims that JAWS is able to read the MSAA properties of a Button, however I am not seeing this currently. Can you verify whether or not this is true? I attached a snippet with a Button example.
Also it appears the other bug report is resolved as well. Is there a bug report against JAWS for the Label issue?
(In reply to comment #10) > I saw the old bug report which claims that JAWS is able to read the MSAA > properties of a Button, however I am not seeing this currently. > Can you verify whether or not this is true? They still read the MSAA name of a Button with an image. They were also reading the MSAA name of text Buttons in JAWS 5.0, but sometime after that, they broke it again. Do you have a real-life use case where the MSAA name for a text button really, truly should be different than the Button's text? (In reply to comment #11) > Also it appears the other bug report is resolved as well. Is there a bug > report against JAWS for the Label issue? No - it's all just in old email. I sent an email to one of the JAWS developers today to ask him to look at it again. I am CC'ing Frank to this bug. He is our liason to Freedom Scientific. Frank, I am hoping that you can keep this bug and the old bug 21771 alive at FS long enough for it to be fixed this time. :)
I have a situation with a label followed by a text field, followed by a button in one row. The text field needs to be disabled since the user is supposed to select the button which will take them to a dialog. The dialog collects the user input and upon exiting the dialog, the text field is populated. JAWS currently is not able to read disabled fields and thus as you are tabbling along the first thing you will hit in that row is the button. For a blind person, it would be beneficial for us to be more descriptive in the accessibility name of the button since that is the only chance the user will know what is being asked for. A couple other situations that I have encountered with JAWS, that I was hoping you have some insight on. 1. Earlier I mentioned disabled fields being ignored by a screen reader. Do you know what the accessibility guidelines say about that, since a blind user has no indication that there are disabled fields in the page. 2. I have several situations in my pages where I organize fields inside of Group objects. Each time, I have a name set for the group. At times JAWS is able to read the name of the group and other times it is not. It appears if you place checkboxes/radio buttons in the Group, it is able to read the name of the group. If you have Label/Text field combinations, then it is not. Are you aware if anyone has encountered this problem?
(In reply to comment 13) I think you should enable the text field and leave it blank. That is what most applications do in this situation. The user might want to type in the info instead of using the button at all. Regarding 2, please open a new bug for this and provide an SWT snippet that shows the problem. Thanks!
Created attachment 130017 [details] Example of a case that requires a disabled field. Response to comment 14: Part 1. I don't think it's reasonable to force text fields to have to stay enabled due to a bug in screen reader software. Please take a look at the graphic attached. Here's an example of a Port value that is requested by the user. The user is expected to hit the Set button, navigate the viewer for the type of port and select it. The user has no idea what to enter in the text field and therefore it doesn't make sense to allow the field to be edittable. One may argue to place the list of port selections in a drop down, however if you notice that the viewer provides a logical grouping that makes it easy for users to search for their desired port. This simply can not be done in a drop down. Going back to the question I had about disabled fields in general, what are your thoughts on that? We have numerous examples of the need to enable/disable fields in general based on user selections and it would a appear that a non-sighted user should be able to know that a field is disabled on a page. Part 2. I will go ahead and open up another bug report. Thanks.
Reopening bug for two reasons. 1. Can a bug report be opened against Freedom Scientific with regards to the accessibility name for an image inside a Label not being honored. 2. Please see comment 14 part 1. I think there is a legitimate case that requires the accessibility name for a Button to be read by JAWS.
Sorry meant to say Comment 15 part 1 not Comment 14 part 1 above.
Frank, how do we "open a bug report" against Freedom Scientific? Thanks! Carolyn
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.