Introduction
I think voice commands using natural language is going to be a big thing on the web, especially for accessibility. Being able to issue a voice command trumps a mouse click or a keyboard input for some users. I'm not sure of the practicality of this experiment right now but I can see voice commands becoming a bigger part of what we do in the near future. And it's fun to shout at a computer.
How it works
- First of all, you'll need Chrome (it's the only browser that currently allows audio inputs)
- Secondly, you'll need to click the mic icon in the input. If you can't see the icon then your browser doesn't support audio inputs (see step 1)
- Say something like Make the font bigger, or magnify the text
- Adjust the font size again if necessary
Limitations
This is an experiment I had to cut short because of a few notable limitations.
- Currently, you can't bind an input to the speech input field. I understand there might be privacy concerns, but for us developers wanting to do a good thing, it would have been lovely to bind something like the "s" key for speech input rather than asking the user to click on the small mic hit area. So this technique is no better than pressing "Cmd" and "+" or "-".
- Responsive containers. Once the font size gets very big, the layout breaks and the breakpoints remain static. If I could specify some modular media queries on the container independently from the browser window then I could make adjustments based on the inner font size.
- Browser limitations. As I mentioned before, it will only work in Chrome for the meantime.
- I put this together in about 20 to 30 minutes so expect bugs and it's incredibly difficult to test voice commands with a Northern Irish accent
- I haven't fully explored the natural language commands (eg "It's too bright", "The font is too small")
But let's think of the possiblities and other situations this might apply to. We can have a bit of fun with this.