Hi,

I recently discovered that the OOUI library, when an input is declared as
"required" (i.e., mandatory), accomplishes this by adding the "required"
parameter to the input, which is an HTML parameter that's part of HTML5.
When "required" is specified, the browser checks the input when the form
gets submitted, and, if it's blank, displays an error message and prevents
form submission.

It's certainly convenient to be able to use HTML's "required", but I see
some weaknesses with this approach, compared to a built-in MediaWiki
solution:

- There is less i18n support. Some browsers have quite impressive language
support - Google Chrome seems to support around 150 languages - but none
have the comprehensiveness of MediaWiki.

- The error message is displayed in the language of the user's browser
settings, rather than in the language they have for the wiki. (Why the two
would be different, I don't know, but it's possible.)

- The display of the error message does not match the OOUI look-and-feel.

Any thoughts about all of these? Was the use of "required" a conscious
decision, or just a matter of convenience?

-Yaron

-- 
WikiWorks · MediaWiki Consulting · http://wikiworks.com
_______________________________________________
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org
List information: 
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/

Reply via email to