The World Wide Web Consortium (W3C) - the body that develops web standards - has published the draft of a specification aimed at making it easier for developers to build web apps that can be controlled by different devices.
The first draft for IndieUI: Events 1.0 sets out a specification for a software abstraction layer that translates user interaction into the desired action on the web app's UI, regardless of whether the app is being controlled using a keyboard, mouse, touch or speech.
"Web developers won't have to worry about the specifics of how users provide input, and can focus just on the user intent," says a W3C blog.
As the number of devices capable of accessing web apps has grown to encompass smartphones and tablets different inputs such as touch and speech have also become more common. Coding for the myriad ways that users can interact with a web app has consequently become more complex.
IndieUI is designed to remove some of that complexity, by providing an alternative to having to code for every possible input that could be used with an app.
Tying these inputs to actions is done by programmatically registering separate event listeners - which allow elements on the page to trigger an action when they receive a specific input. These inputs could range from simple, like pressing a combination of keys, to complex, like a screen swipe, which has to be treated as a sequence of separate but related touch events that have to be processed together.
In the IndieUI: Events 1.0 working draft the authors give the example of how triggering an event to 'undo' the last action in a web app could be made simpler using IndieUI.
"Web application authors, wishing to intercept a user's intent to 'undo' the last action, need to "listen" for all of the following events: control+z on Windows and Linux, control+z on Mac OS X, shake events on some mobile devices," the specification said.
"It would be simpler to listen for a single, normalised request to 'undo' the previous action."
Rather than setting an event handler that triggers an action in the web app when a specific combination of keys are pressed or the device is shaken, developers would instead register a IndieUI event that relays the user's intention to the web app so it can carry out the desired action. The specific type of input - a click or a swipe, etc. - that triggers a given IndieUI event would be defined by each operating system and converted automatically by the platform before being sent to the app.
Angus Fox, director of mobile apps developer Multizone, said that by providing a way to programmatically manipulate an app's interface in the same way a user would, IndieUI would allow for automated testing of mobile web apps across multiple platforms in a way that is not possible today.
"When testing you can't get to these aspect of the way the user interface's work in any meaningful way across different platforms and devices, so this is the sort of thing that could help in that area.
"Mobile phone software providers often do manual testing. Doing this manually is very expensive," he said, given there could be thousands of interactions that need to be tested in tens of different languages.
IndieUI is also designed to increase the accessibility of web apps, by making it easier to for assistive technologies like speech controlled interfaces and screen readers to interact apps.
One of the primary goals of IndieUI is to: "Enable every type of control in these interfaces to be programmatically determinable and controllable by both mainstream and alternate forms of user input, including assistive technologies".