Re: [w3ctag/design-reviews] WebXR Device API (#403)

Thanks for raising this review! I had a read through the spec (and, as discussed offline, sent a [PR](https://github.com/immersive-web/webxr/pull/818) attempting to make some aspects of the explainer more concise and readable) and I came up with some questions/thoughts:

### Accessibility 
Obviously I'd like to see the question of [accessibility](https://www.w3.org/WAI/APA/task-forces/research-questions/wiki/Accessibility_of_Virtual_Reality) addressed sooner rather than later. 

I am looking forward to the session at TPAC dedicated to this question, but I noted that the [Goals](https://github.com/immersive-web/webxr/blob/master/explainer.md#goals) section noted only "Display imagery on the XR device at the appropriate frame rate" alongside "Poll the XR device and associated input device state". 

That seems overly narrow even leaving the question of accessibility aside, given that many existing immersive experiences include sound and haptic feedback. In particular, though, for innovation in XR accessibility to be possible, authors will need the ability to control different modalities for conveying information about the virtual space which is being presented.

Could the [Web Audio](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Web_audio_spatialization_basics), [Vibration](https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API) and [Gamepad](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad) APIs make use of `XRViewerPose` to provide this immersive experience? How does that work with the frame-based mechanism for updating the `XRViewerPose`? Could the explainer (or another document) provide some example code for linking these things together?

For users who require magnification, might it make sense to have an option on the viewport to perform appropriate scaling automatically?

There are also some interesting use cases around accessibility mentioned in the research document linked above, which might make good motivating examples: 
- virtual assistive devices (e.g. a "virtual cane") for navigating virtual environments
   - I could also imagine an assistive technology which used augmented reality techniques to provide assistive feedback for the real world - such as using spatial audio to warn people with visual impairments about hazards at head height, or providing subtitles to real life for Deaf/hard of hearing individuals
- simulation of disability in virtual reality, both as a rehabilitation aid and a training aid
- virtual environments designed to be therapeutic to individuals with cognitive differences
- virtual exploration of architectural designs developed according to Universal Design principles

### Explainer/API questions
- Please add a table of contents!
- The explainer lists immersive video as a use case. Why would we not design an extension to `<video>` for this case?
- Why does `navigator.xr.supportsSession()` not return a `Promise<boolean>` rather than rejecting in the case that the session type is not supported? That would seem like a better semantic match to the wording of the method, as well as not requiring the author to program a simple feature detection step in a try/catch style.
   - Could you elaborate on why `inline` is the default?
- Naming: it seems like the `vr` in `immersive-vr` is both redundant and inaccurate (since it doesn't encompass AR). Could it just be `immersive`?
- The explainer doesn't provide example code for avoiding or handling WebGL context loss. Is the author supposed to avoid it altogether by using `makeXRCompatible()`, or are there other factors to consider?
- Similarly, a code example for handling XR device changes would be useful.
- Could you deep-link to the section in the Spatial Tracking Explainer which explains how to handle `getViewerPose()` failures?
- Might it be helpful to provide a code example showing how to use the `transform` property of the `XRViewerPose` value?
- Could you expand on the key concept of a Layer?
- What are the key differences between an `XRWebGLLayer` and a `<canvas>`?
- When might a session be blurred?


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/403#issuecomment-527299905

Received on Tuesday, 3 September 2019 04:32:41 UTC