Re: User Context IDL Issues

I'd been keeping this email around to make sure I addressed all the IDL issues raised. With the recent edits to the User Context module, I think I have now addressed the raised points in both modules, even if partially because some of the interfaces listed below have been removed. Thanks for your very helpful input which I will keep as a reference in case any similar features are added back in.

Cheers,
James


On Oct 22, 2012, at 4:25 AM, Lachlan Hunt <lachlan.hunt@lachy.id.au> wrote:

> Hi,
>  In the User Context module, the IDL is being defined incorrectly.
> 
> The Accessibility interface is defined as:
> 
> interface Accessibility {
>  readonly attribute InterfaceObject accessibility;
> };
> 
> The accompanying editorial note questions whether this is correct or not, and if I understand the intention, it's not correct.
> 
> There is no defined interface called "InterfaceObject", and so no attribute can return an object of that type.  The intention, however, seems to be as a way of defining the accessibility attribute that is to appear on window.navigator.accessibility.
> 
> This should be defined by defining a partial interface for Navigator, with a property defined to return an instance of the Accessibility interface.
> 
> partial interface Navigator {
>  readonly attribute Accessibility accessibility;
> }
> 
> Similarly, for the ScreenReader and Magnifier, these should be defined with properties on the Accessibility Object.  Additionally, these ScreenReader and Magnifier interfaces do not need to be split up further into interfaces for ScreenReaderID, ScreenReaderStatus, etc.  Instead, the propeties and methods defined within these should simply be defined as part of their respective parent interfaces.
> 
> This is the complete IDL that is needed for the spec, as it stands now, based on the intended structure from the examples provided:
> 
> partial interface Navigator {
>  readonly attribute Accessibility accessibility;
> }
> 
> interface Accessibility {
>  readonly attribute ScreenReader screenreader
>  readonly attribute Magnifier magnifier
> 
>  // Notifications
>  const unsigned short    screenChanged   = 1;
>  const unsigned short    elementChanged  = 2;
>  void postNotification(required String notification, optional HTMLElement element);
> };
> 
> interface ScreenReader {
>  // ID
>  readonly attribute DOMString name;
>  readonly attribute DOMString version;
> 
>  // Status
>  readonly attribute boolean active;
> };
> 
> interface Magnifier {
>  // ID
>  readonly attribute DOMString name;
>  readonly attribute DOMString version;
> 
>  // Status
>  readonly attribute boolean active;
> 
> // Notifications {
>  void focusPosition(
>         in DOMElement element,
>         in optional array cursorRect,
>         in optional array selectionPolygon
>       );
> };
> 
> Note: The Speech interface is not yet defined in the spec, but was referred to with this statement:
> 
>  Accessibility implements Speech;
> 
> The intention of this API is not clear from the current draft, and so has not been included in the IDL above.  But presumably, it will be defined similarly to the ScreenReader and Magnifier interfaces.
> 
> 
> As I have defined the IDL above, that will correctly expose the properties for the interfaces as follows, which is how the examples illustrate their use in the spec.
> 
> window.navigator.accessibility.screenreader
> window.navigator.accessibility.magnifier
> 
> -- 
> Lachlan Hunt - Opera Software
> http://lachy.id.au/
> http://www.opera.com/
> 

Received on Wednesday, 27 March 2013 15:50:47 UTC