Bug 447934 - Accessibility: AccessibleTableListener getCaption and getSummary fail to return table caption and summary
Summary: Accessibility: AccessibleTableListener getCaption and getSummary fail to retu...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.7 M6   Edit
Assignee: Arun Thondapu CLA
QA Contact:
URL:
Whiteboard:
Keywords: accessibility
Depends on:
Blocks: 445551
  Show dependency tree
 
Reported: 2014-10-20 10:16 EDT by Maureen Kraft CLA
Modified: 2017-04-06 14:02 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maureen Kraft CLA 2014-10-20 10:16:37 EDT
We are putting together techniques for Section 508 Refresh Interoperability checkpoints of the Section 508 refresh for Eclipse. In the AccessibleTable SWT example the getCaption and getSummary methods are trying to return strings in the result of the AccessibleEvent instead of returning the Accessible object of the caption and summary. 

e.result = "This is the Custom Table's Summary";

I found a comment from Pete Brunet to Rich Schwerdtfeger from last October regarding regarding a statement in the IA2 spec that the caption and summary methods marked as deprecated and that instead a describedby and labelledby relations should be created. Pete indicates that this is not correct. 

I believe we should return the Accessible object of a Label or read only Text object in the event's accessible field. For summary, I'm thinking we may want to setVisible to false as well. 

Label caption;
caption = new Label(this,SWT.NONE);
caption.setText("This is the table's caption");

accessibleTable.addAccessibleTableListener(new AccessibleTableAdapter() {
		
		@Override
		public void getCaption(AccessibleTableEvent e) {
			// 
			e.accessible = caption.getAccessible();
		}
	});

We attempted to write our own sample code returning the Accessible object for Caption and Summary as outline in the IA2 spec but this was not recognized by AccProbe. 

In any event, we need to ensure Eclipse SWT APIs are implementing getCaption and getSummary methods according to IA2 spec.
Comment 1 Maureen Kraft CLA 2016-02-09 18:55:43 EST
***Update*** 

I have confirmed with Alexander Surkov that IAccessibleTable2::caption and IAccessibleTable2::summary are deprecated functions and furthermore that the IA2 specification currently has errors. From Pete Brunet to Alexander, 
"The IAccessibleTable2 spec has an error.  The deprecation note on the caption method indicates that a describedBy relation should be used and the deprecation note on the summary method indicates that a labeledBy relation should be used instead.  This is backwards and I will submit a replacement soon."

I have opened a related bug on the IA2 spec. See Linux Foundation bug #1343, https://bugs.linuxfoundation.org/show_bug.cgi?id=1343

I think the safest bet is to deprecate the methods getCaption and getSummary on the AccessibleTableAdapter and AccessibleTableListener and update the SWT Example, AccessibleTableExample.java.
Comment 3 Arun Thondapu CLA 2017-04-06 13:42:30 EDT
(In reply to Maureen Kraft from comment #1)
> ***Update*** 
> 
> I have confirmed with Alexander Surkov that IAccessibleTable2::caption and
> IAccessibleTable2::summary are deprecated functions and furthermore that the
> IA2 specification currently has errors. From Pete Brunet to Alexander, 
> "The IAccessibleTable2 spec has an error.  The deprecation note on the
> caption method indicates that a describedBy relation should be used and the
> deprecation note on the summary method indicates that a labeledBy relation
> should be used instead.  This is backwards and I will submit a replacement
> soon."
> 
> I have opened a related bug on the IA2 spec. See Linux Foundation bug #1343,
> https://bugs.linuxfoundation.org/show_bug.cgi?id=1343
> 
> I think the safest bet is to deprecate the methods getCaption and getSummary
> on the AccessibleTableAdapter and AccessibleTableListener and update the SWT
> Example, AccessibleTableExample.java.

These methods have been deprecated in 4.7 via the commit in comment 2 since the IA2 specification has deprecated the IAccessibleTable2::caption and IAccessibleTable2::summary functions. The Javadoc has also been updated with the appropriate relations to be used instead of these methods.

I'll resolve this bug as fixed and raise a new bug for updating the usages of these methods in SWT including AccessibleTableExample.java.
Comment 4 Arun Thondapu CLA 2017-04-06 14:02:16 EDT
(In reply to Arun Thondapu from comment #3)
> I'll resolve this bug as fixed and raise a new bug for updating the usages
> of these methods in SWT including AccessibleTableExample.java.

Bug 514871 has been raised for replacing the usage of the deprecated methods.