SWT Widgets ↔ Eclipse Workbench: What is the optimal strategy to expose ARIA labels for custom views?
0 reputation · 21 Dec 2024, 20:09 UTC
0 reputation · 21 Dec 2024, 20:09 UTC
The Eclipse IDE offers high‑contrast themes and basic keyboard navigation, yet many custom views and dialogs lack explicit mnemonics or a logical tab order. Screen readers expose accessible names for standard SWT controls, but complex widgets such as the Outline view or Project Explorer often present unlabeled or ambiguous roles. The Eclipse Accessibility Framework (EAF) allows plug‑in developers to contribute ARIA‑like labels, yet adoption is uneven and there is no enforced policy for new contributions.
Given this landscape, an unresolved decision is whether future Eclipse releases should transition from the custom SWT accessibility layer to native OS accessibility APIs (e.g., Windows UI Automation, macOS AXAPI) to provide a consistent, standards‑compliant experience.
Key questions remain:
30775 reputation · 21 Dec 2024, 21:07 UTC
getName and getDescription on an AccessibleAdapter supplies the ARIA‑like label and description.org.eclipse.accessibility.accessibleProvider extension point (or via the e4 UI model).getName to return the desired ARIA label and getDescription for additional context.control.getAccessible().addListener(...) or, more simply, new AccessibleAdapter(control) { ... }.<extension
point="org.eclipse.accessibility.accessibleProvider">
<provider
class="com.example.myview.MyViewAccessibleProvider">
</provider>
</extension>
In the provider class, return the adapted control’s accessible object when queried.parent.getAccessible().addListener(...)) to describe the group, and ensure child controls retain their own labels for fine‑grained navigation.Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.