Eclectic Media Git rhapsode / 2f4a9ea
Add new issue Adrian Cochrane 4 months ago
1 changed file(s) with 71 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 # Webforms
1
2 The core browser engine would deal in terms of loosely-defined links, but sometimes pages require more free-form input.
3 For this reason Rhapsode would require a mode to deal with webforms, which needs to be designed and implemented. Or maybe there'd be two modes, the second using extended markup to deliver a more lenient and conversational experience. You'd enter this mode by treating the <form> tag like a link.
4
5 I would need to build upon this to bookmark webpages or search the Web.
6
7 ---
8
9 The experience I'm currently thinking about delivering for webforms, would step you through each non-prefilled input prompting you to fill it.
10 For each it'll announce the label and, more quietly, the input type possibly with brief instructions for filling it in. If it's a multichoice input, the options would be read out as well. Your input would be interpreted according to the input type. A pause or left/down arrow key would store that value and move on to the next input, or right/up would return to the previous form input.
11 If it's a multichoice or <datalist>-associated input, it may then clarify which you mean in exactly the same way Rhapsode normally deals with links.
12 Once the form has been filled in, it'll read everything back out to you again (include any "hidden" inputs). At which point you can:
13
14 * reenter any input by specifying it's label,
15 * assign shorthand names (to be resolved via the multichoice handling) for any values you've entered using the "petname" command,
16 * or submit the form using the "submit" command.
17
18 ---
19
20 As an extension on that form-filling experience that allows websites to cater specifically to Rhapsode's voice interface, we could add a Rhapsode-specific property onto `<form>` elements linking to a list of newline-seperated natural phrases that can be used for filling in the form.
21
22 "Placeholders" would occur within each phrase identifying form inputs by `name` attribute.
23
24 To use an Alexa-derived example, this list could start with:
25
26 I want a {pet}.
27 I want a {size} {pet}.
28 I want a {pet} {energy}.
29 I want a {pet} {temperament}.
30 I want a {temperament} {pet}.
31 I want a {size} {temperament} {pet}.
32 I want a {size} {temperament} {pet} {energy} at my apartment.
33
34 Which would enhance interaction with:
35
36 <form ... rhaps-utterances-src="...">
37 <dl>
38 <dt><label for="input-pet">What type of pet do you want?</label></dt>
39 <dd><select id="input-pet" name="pet">
40 <option value="cat">Cat</option>
41 <option value="dog" checked>Dog</option>
42 </select></dd>
43
44 <dt><label for="input-size">How big should it be?</label></dt>
45 <dd><select id="input-size" name="size" required>
46 <option value="xs" title="petite, itty bitty">Tiny</option>
47 <option value="s" title="little, take on a plane">Small</option>
48 <option value="m" title="average, up to my knees">Medium</option>
49 <option value="l" title="huge, waste-high">Large</option>
50 </select></dd>
51
52 <dt><label for="input-energy" required>How energetic?</label></dt>
53 <dd><select id="input-energy" name="energy">
54 <option value="low" title="to relax with, to cuddle with">Low</option>
55 <option value="med" title="fun to play with, plays tug of war">Medium</option>
56 <option value="high" title="energetic, plays frizbee, that I can run with">High</option>
57 </select></dd>
58
59 <dt><label for="input-temperament">Family pet or guard dog?</label>
60 <dd><select id="input-temperament" name="temperament">
61 <option value="family" title="to relax with, to cuddle with">Family</option>
62 <option value="guard" title="fun to play with, plays tug of war">Guard</option>
63 </select></dd>
64 </dl>
65 </form>
66
67 ---
68
69 To activate this mode, I'm thinking of letting the autofocus attribute trigger it and listening for the text of the "submit" button. If there is no submit button, I'd instead listen for "enter/submit/fill-in form".
70 When the page is read aloud, you would hear this text at the start of the form with the usual audio cue.