[Accessibility-ia2] Relations

James Teh jamie at jantrid.net
Thu Oct 22 16:00:29 PDT 2009


On 23/10/2009 1:03 AM, Carolyn MacLeod wrote:
> I think deprecating IAccessible2 would be really confusing to everyone,
> no matter what the new interface's name is.
Agreed, although there may be sufficient justification; ee below.

> Perhaps something like this might be a bit less wild?
> - deprecate IAccessible2::nRelations, relation, relations
> - add IAccessibleRelationships
I think this makes sense if this is the only reason we are deprecating 
IAccessible2.

 > (although I guess then AT's would have to QI or QS to get an object's
 > relations, which is more work for a pretty common thing...)
QI isn't so bad. Certainly, I think QS would be a bad thing.

> which has only 2 methods: relations and
> relationsForType
I'm more for Pete's original suggestion; i.e.
> HRESULT relation ([in] BSTR *relationType, [out, retval] IAccessibleRelation **relation)
Remember that IAccessibleRelation accounts for multiple targets.

Another idea is to deprecate IAccessibleRelation altogether and just 
have the relation() method return an array of targets for the specified 
type, similar to IAccessibleTableCell::columnHeaderCells. The question 
is: when retrieving relations, is it fair to assume that an AT wants all 
targets in the majority of cases? If this is an incorrect assumption, 
then this would be less efficient.

With regard to deprecating IAccessible2:
If it was just relations, I would think a new interface (as proposed 
here) is fine. However, if we want a new interface for attributes as 
well (see Pete's previous email), that's two new "add-on" interfaces 
replacing deprecated functionality. In that case, perhaps it is time to 
consider deprecating IAccessible2. However, I agree that this would be a 
total pain for everyone involved.

The Microsoft approach is generally to subclass the old interface and 
just add the new methods to the subclassed interface, rather than 
replacing it altogether. See MSHTML for example.

Jamie

-- 
James Teh
Email/MSN Messenger/Jabber: jamie at jantrid.net
Web site: http://www.jantrid.net/


More information about the Accessibility-ia2 mailing list