Bug 574933 - Branch Selection in Clone Git Repository title unread by JAWS (accessibility)
Summary: Branch Selection in Clone Git Repository title unread by JAWS (accessibility)
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 5.12   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: 5.13   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-20 19:30 EDT by Gerald Mitchell CLA
Modified: 2021-09-08 09:51 EDT (History)
2 users (show)

See Also:


Attachments
Visual example of area that jaws does not read in Clone Git Repository wizard on the Branch Selection page (21.36 KB, image/png)
2021-07-20 19:30 EDT, Gerald Mitchell CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Mitchell CLA 2021-07-20 19:30:00 EDT
Created attachment 286812 [details]
Visual example of area that jaws does not read in Clone Git Repository wizard on the Branch Selection page

In the Clone Git Repository wizard on the Branch Selection page, the label  Branches of file: <contents>   is not read aloud by Jaws.

Investigation of the code quickly leads to the assumption that it is due to being a label not associated with text field as the what looks like a field that would be associated to the label is actually a part of the FilteredCheckboxTree.

org.eclipse.egit.ui.internal.clone.SourceBranchPage

line 137: 	label = new Label(panel, SWT.NONE);
line 138:	label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));

line 337: 	label.setText(NLS.bind(UIText.SourceBranchPage_branchList,
line 337:		newRepoSelection.getURI().toString()));

One possible solution is to make the label into a read-only Text control. 
This would enable the user to set the focus to the label and allow Jaws to read the contents. 
Another is to have the filtered tree and possibly the buttons as part of a group.
Comment 1 Thomas Wolf CLA 2021-07-21 03:13:59 EDT
Using a Group gives a completely unnecessary border. Support for screen readers should not compromise visual layout.

Changing labels to read-only texts gives other side effects. You get a context menu with, depending on the OS, several nonsensical menu entries. Using a read-only StyledText might be a possibility. Anyway, a screen reader would not discover the connection between the FilteredTree and the label, and read the "label" only if focused.

But it seems to me that adding an AccessibilityAdapter to the FilteredCheckboxTree search field might work. Something like

  FilteredCheckboxTree fTree = ...;

  fTree.getFilterControl().getAccessible()
    .addAccessibleListener(new AccessibleAdapter() {
	
      @Override
      public void getName(AccessibleEvent e) {
        e.result = label.getText();
      }
    });

might do the trick. That should make the reader read the label when the search field is focused (which it is initially).

Could you give that a try, please? I don't have Windows, nor JAWS, so I can't really verify this. It does work with VoiceOver on Mac: it reads the label, tells me it's a search field, and that I should type text to filter branches.

If it also works for JAWS, other places where FilteredTrees or FilteredCheckboxTrees are used should be examined and if needed also be changed in a similar way.
Comment 2 Gerald Mitchell CLA 2021-07-21 09:30:06 EDT
Thank you.
I will try that and report back.
Comment 3 Eclipse Genie CLA 2021-07-26 03:47:45 EDT
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/183359
Comment 5 Thomas Wolf CLA 2021-07-26 16:21:10 EDT
@Gerald, feel free to re-open if it shouldn't work well enough with JAWS.
Comment 6 Gerald Mitchell CLA 2021-09-08 09:51:12 EDT
Sorry for the late reply. I seemed to have missed updating the bBgzilla.
that seemed to do the trick. Thank you!
Tested 2021-08-12 Windows 10, JAWS 2021, Eclipse 2021-03