Description
What is the issue with the HTML Standard?
Problem Statement
In Japanese input environments, users frequently type full-width digits and symbols using IMEs when entering numbers. However, because <input type="number">
does not accept these characters, the element is often avoided in Japan — even when it would otherwise be the semantically correct choice.
Real-World Example
In Japan, it is common to switch between Japanese and English input modes using an IME, depending on the content being typed. For example, consider a form with two consecutive fields: a name field and an age field, where the age field uses <input type="number">
.
A user would naturally enter their name in full-width Japanese characters. Without consciously switching to English input mode, they might then move directly to the age field and continue typing in the same (Japanese) input mode.
When using a Japanese IME, typing numbers or symbols in this state produces full-width digits and punctuation. As a result, browsers may reject the input: some versions of Chrome (up to version 138) discard it entirely upon confirmation, while in WebKit, the input appears to succeed but the .value
becomes an empty string.
While experienced users might eventually notice what’s happening, in practice this leads to real-world confusion. At my company, we have even received calls from users reporting this as a bug in our forms.
Since JavaScript cannot intercept or correct full-width characters before they are rejected, developers are often forced to avoid using <input type="number">
altogether — even when it would be the appropriate semantic choice.
Affected Characters
The following characters are commonly produced by Japanese IMEs during numeric input in full-width mode:
-
Full-width digits: U+FF10–U+FF19
→ Example:'1234567890'
(instead of'1234567890'
) -
Minus sign variants:
- U+FF0D: Full-width hyphen-minus (often produced on Windows in full-width alphanumeric input)
→'-123'
- U+2212: Unicode minus sign (commonly produced on macOS in full-width alphanumeric input)
→'−123'
- U+30FC: Long sound mark (inserted when typing a minus sign alone in kana mode)
→'ー123'
- U+FF0D: Full-width hyphen-minus (often produced on Windows in full-width alphanumeric input)
-
Full-width full stop: U+FF0E
→ Used for decimal points in numbers like'3.14'
Current Browser Behavior
The handling of full-width numeric characters in <input type="number">
currently varies across major browsers:
-
Blink (Chromium)
- Prior to version 139, typing full-width characters (e.g.,
123
) into a number field and confirming the input would cause the text to be silently cleared. - Starting in version 139, normalization of
U+FF0D
(full-width hyphen-minus) andU+30FC
(long sound mark) was implemented during native keyboard input, allowing input likeー123
or-5
to be accepted as-123
or-5
.
This behavior was implemented by the author of this issue (Chromium CL 6609680). - Normalization of
U+2212
(Unicode minus sign) is currently in progress at: https://chromium-review.googlesource.com/c/chromium/src/+/6665760 - Assignment via JavaScript (e.g.,
input.value = '123'
) strictly follows the HTML specification and is rejected — the value is not accepted, and.valueAsNumber
isNaN
.
- Prior to version 139, typing full-width characters (e.g.,
-
WebKit (Safari)
- A patch is currently under review to normalize the following characters during native keyboard input only:
- Full-width digits:
U+FF10–U+FF19
- Minus sign variants:
U+FF0D
,U+30FC
,U+2212
- Full-width full stop:
U+FF0E
- Full-width digits:
- Related discussion: Bugzilla Issue / Patch or PR
- Like Chromium, JavaScript assignment via
.value
does not trigger normalization. The field may display the characters, but.value
is empty internally if the input is invalid.
- A patch is currently under review to normalize the following characters during native keyboard input only:
-
Gecko (Firefox)
- Both native keyboard input and JavaScript assignment (e.g.,
input.value = '123'
) are accepted as valid numeric input.
This behavior has been in place at least since before December 2024, when I first became aware of the issue. - Gecko appears to have recognized this issue early on and has implemented permissive behavior accordingly.
- Full-width digits and many symbol variants are accepted and parsed as numbers, including some emoji-like or decorative numerals.
- However,
U+30FC
(long sound mark) is not supported and will cause the input to be rejected or interpreted as invalid. - This behavior is more permissive than in Chromium or WebKit, but it is not defined in the HTML specification.
- A separate issue has been opened to discuss whether such permissive behavior is conforming per the current spec: Gecko accepts non-conforming full-width digits in <input type="number"> #11405
- Both native keyboard input and JavaScript assignment (e.g.,
This inconsistency leads to compatibility issues for web developers and confusion for users — especially in regions where full-width input is the norm.
Proposal
Update the HTML specification to allow user agents to normalize certain full-width characters during native text input in <input type="number">
.
Specifically, the characters listed in the Affected Characters section should be explicitly allowed — or recommended via a should
statement — to be normalized by the user agent before parsing or rejecting the input.
This would reflect current behavior in some engines and clarify expectations across implementations.
Benefits of standardizing this behavior include:
- Improved usability in East Asian input environments
- Reduced developer confusion and workaround code
- Better interoperability across browsers
If there's interest, I’m happy to help draft concrete spec text or open a pull request to formalize this.
This proposal does not seek to change the behavior of JavaScript assignment to .value
. For discussion on whether such input should be considered conforming, please refer to issue #11405 .
Reference
- Test case (non-WPT): https://bug-284363-attachments.webkit.org/attachment.cgi?id=475645
- WebKit Bugzilla issue: https://bugs.webkit.org/show_bug.cgi?id=284363
- WebKit Pull Request: <input type="number"> does not support full-width numbers (e.g., "ー200") for Japanese IME users WebKit/WebKit#47095
- Chromium issue: https://issues.chromium.org/issues/383232110
Let me know if this is something we could move forward with.
Acknowledgments
I’d like to thank Anne van Kesteren for their thoughtful discussion and encouragement in raising this issue.
I’m also grateful to everyone who has provided feedback and support during related development and review work in Chromium and WebKit — your input has been instrumental in shaping this proposal.
Thank you all for helping improve the consistency and usability of the web.