Closed
Bug 1016931
Opened 10 years ago
Closed 10 years ago
<input type=number> tooltip text is misleading for violations of attributes "min" and "max" (e.g. says "higher than", but means "at least")
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla32
People
(Reporter: JasnaPaka, Assigned: jwatt)
References
(Depends on 1 open bug)
Details
Attachments
(3 files, 1 obsolete file)
One from our contributors reports bug which is related to "<input type=number>" and attributes "min" and "max". In our example we have this form field: <input type="number" min="1" max="99"> If you enter number "0" form field gets red border around because validation error. If you do hover effect you will see tooltip "Please select a value that is higher than 1." This is wrong because number 1 is acceptable value in our example. Tooltip should be something like "... higher or equal to...". The familliar problem is with "max" attribute.
Reporter | ||
Comment 1•10 years ago
|
||
Comment 2•10 years ago
|
||
Original landing bug should be bug 635553. Also the tooltip for higher limit is not clear: put 100, it says "lower than 99", but it should be "lower than or equal to 99". The comment says that %S could be a date or a time, which makes it even worse (lower/higher applied to time).
Updated•10 years ago
|
Flags: needinfo?(jwatt)
Comment 3•10 years ago
|
||
The strings in question are: > 36 # LOCALIZATION NOTE (FormValidationRangeOverflow): %S can be a number, a date or a time. > 37 FormValidationRangeOverflow=Please select a value that is lower than %S. > 38 # LOCALIZATION NOTE (FormValidationRangeUnderflow): %S can be a number, a date or a time. > 39 FormValidationRangeUnderflow=Please select a value that is higher than %S. http://mxr.mozilla.org/mozilla-central/source/dom/locales/en-US/chrome/dom/dom.properties#36
Component: Layout: Form Controls → DOM: Core & HTML
Version: unspecified → Trunk
Updated•10 years ago
|
Summary: <input type=number> shows wrong tooltip for attributes "min" and "max" → <input type=number> tooltip text is misleading for violations of attributes "min" and "max" (e.g. says "higher than", but means "at least")
Assignee | ||
Comment 4•10 years ago
|
||
Yeah, that creates a poor UX. Thanks for the bug report!
Assignee | ||
Comment 5•10 years ago
|
||
Olli: I've separated date and time because I didn't want to assume that locals would use the same text for both.
Comment 6•10 years ago
|
||
Comment on attachment 8430387 [details] [diff] [review] patch Review of attachment 8430387 [details] [diff] [review]: ----------------------------------------------------------------- Please see this MDN page about making string changes ;-) https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_best_practices#Changing_existing_strings
Attachment #8430387 -
Flags: feedback-
Assignee | ||
Comment 7•10 years ago
|
||
Thanks, Francesco!
Attachment #8430387 -
Attachment is obsolete: true
Attachment #8430387 -
Flags: review?(bugs)
Attachment #8430937 -
Flags: review?(bugs)
Comment 8•10 years ago
|
||
Comment on attachment 8430937 [details] [diff] [review] patch > # LOCALIZATION NOTE (FormValidationPatternMismatchWithTitle): %S is the (possibly truncated) title attribute value. > FormValidationPatternMismatchWithTitle=Please match the requested format: %S. >-# LOCALIZATION NOTE (FormValidationRangeOverflow): %S can be a number, a date or a time. >-FormValidationRangeOverflow=Please select a value that is lower than %S. >-# LOCALIZATION NOTE (FormValidationRangeUnderflow): %S can be a number, a date or a time. >-FormValidationRangeUnderflow=Please select a value that is higher than %S. >+# LOCALIZATION NOTE (FormValidationNumberRangeOverflow): %S is a number. >+FormValidationNumberRangeOverflow=Please select a value that is no more than %S. >+# LOCALIZATION NOTE (FormValidationTimeRangeOverflow): %S is a date. >+FormValidationDateRangeOverflow=Please select a value that is no later than %S. >+# LOCALIZATION NOTE (FormValidationTimeRangeOverflow): %S is a time. You mention FormValidationTimeRangeOverflow twice in the comments. The first one should be about FormValidationDateRangeOverflow
Attachment #8430937 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 9•10 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #8) > You mention FormValidationTimeRangeOverflow twice in the comments. The first > one should be about FormValidationDateRangeOverflow Good catch, thanks. https://hg.mozilla.org/integration/mozilla-inbound/rev/86fb2abbff1b
Comment 10•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/86fb2abbff1b
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Comment 11•10 years ago
|
||
Comment on attachment 8430937 [details] [diff] [review] patch Why is ther a differents between /dom/locales/en-US/chrome/dom/dom.properties +FormValidationTimeRangeUnderflow=Please select a value that is no earlier than %S. and /webapprt/locales/en-US/webapprt/overrides/dom.properties +FormValidationTimeRangeUnderflow=Please select a value that is no later than %S. and some other strings?
Comment 12•10 years ago
|
||
Tim, see bug above your comment (bug 1023213).
Comment 14•9 years ago
|
||
Problem stiil appears. I'm curently on 38.0.5, Polish. Max for numeric field does not work properly. It says (after translation to english) "Please select value lower than ..." instead of "Please select value lower or equal than ..." (or better "... not higher than" as in Chrome and Opera). Original message in polish is "Proszę wybrać wartość mniejszą niż ..."
Comment 15•9 years ago
|
||
(In reply to aduszczynski from comment #14) > Max for numeric field does not work properly. It says (after translation to > english) "Please select value lower than ..." instead of "Please select > value lower or equal than ..." (or better "... not higher than" as in Chrome > and Opera). > Original message in polish is "Proszę wybrać wartość mniejszą niż ..." Plese file a new bug in Mozilla Localizations::Polish
Comment 16•9 years ago
|
||
Filled in Mozilla Localizations::Polish, Bug 1182401
You need to log in
before you can comment on or make changes to this bug.
Description
•