I'm setting up an HTML <form> and tried to use the "required" attribute on
one input field. (Actually my form consists of only that single field.)
Unfortunately "required" has no effect in Netsurf (#5033 on Ro 5.25). The
user can get away with just clicking Submit without entering any data.
In the Netsurf documentation, the section on web standards says "Forms:
nearly done". I presume this attribute is one of the undone-yet!
I tested my form on Chrome (on Android fone), and it rightly did not allow
Submit to be clicked before the user filled in the field. In fact Chrome
zooms in on the field and pops up a tooltip-like box pointing to it saying
something like "You must fill in your name".
I don't suppose RiscOS can do the tooltip thing, but maybe Netsurf could
put a similar message at the bottom of the window where we usually see
"Done (0.1s)" -- maybe even in flashing red?
Or a message in the field itself -- like the "placeholder" attribute.
By the way, it would be nice if Netsurf could automatically blank the
"placeholder" text (as other platforms do) when the user begins to type
something in the field. Of course Ctrl-U does the trick in RiscOS, but it
has to be done manually or else the placeholder text gets submitted along
with what's typed. (And naive users might not know the Ctrl-U keystroke.)
I found detailed specs here but haven't yet tried everything:
https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required
Cheers. And thanks again to the faithful dedicatees on the Netsurf crew
for all their work over many years!
--
Jim Nagel www.archivemag.co.uk
No comments:
Post a Comment