1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-15 04:55:22 +02:00

Bug 575949: The section title cannot be read out

The section title "Elements" can not be read out from Syntax Coloring
Preferences page. "Preview" could also not be read out.

Change-Id: Ia8e8261739100808eda7bccb28b4c2fca5d59210
Reported-by: Gerald Mitchell <Gerald.Mitchell@ibm.com>
Signed-off-by: Gerald Mitchell <Gerald.Mitchell@ibm.com>
This commit is contained in:
Gerald Mitchell 2021-09-15 22:50:59 -04:00 committed by GeraldMit
parent b7cc884e3d
commit 525f801293

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2020 IBM Corporation and others.
* Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@ -56,6 +56,8 @@ import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.AccessibleAdapter;
import org.eclipse.swt.accessibility.AccessibleEvent;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
@ -647,6 +649,13 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
gd.widthHint = maxWidth;
fListViewer.getControl().setLayoutData(gd);
// add the coloring element label text as the name for the list viewer
fListViewer.getControl().getAccessible().addAccessibleListener(new AccessibleAdapter() {
@Override
public void getName(AccessibleEvent e) {
e.result = PreferencesMessages.CEditorColoringConfigurationBlock_coloring_element;
}
});
Composite stylesComposite = new Composite(editorComposite, SWT.NONE);
layout = new GridLayout();
@ -711,6 +720,13 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
gd.widthHint = convertWidthInCharsToPixels(20);
gd.heightHint = convertHeightInCharsToPixels(5);
previewer.setLayoutData(gd);
// add the preview label text as the name to the previewer
previewer.getAccessible().addAccessibleListener(new AccessibleAdapter() {
@Override
public void getName(AccessibleEvent e) {
e.result = PreferencesMessages.CEditorColoringConfigurationBlock_preview;
}
});
fListViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override