Open
Description
Proposal
Firefox currently accepts and normalizes full-width digits (U+FF10–U+FF19) when entering values into .
This behavior appears to diverge from the HTML specification, which requires that the value conforms to the grammar for a valid floating-point number, i.e., using only ASCII digits, minus signs, and decimal points.
I propose adding a dedicated Web Platform Test to cover this behavior and ensure consistent implementation across browsers.
It would be useful to have a dedicated web platform test to ensure consistent behavior across browsers.
Tentative WPT snippet
Below is a tentative WPT-style test for <input type="number">
with full-width digits and symbols:
<!-- input-type-number-rejects-non-ascii-digits.tentative.html -->
<script>
test(() => {
const input = document.createElement('input');
input.type = 'number';
input.value = '234'; // full-width digits
assert_equals(input.value, '', 'Full-width digits should not be accepted');
}, 'Reject full-width digits (U+FF12 etc) in input[type=number]');
</script>
Console results
Firefox 141 | Chrome 140 | Safari 18.4 |
---|---|---|
![]() |
![]() |
![]() |
Related issue
- Define optional normalization of full-width characters in <input type="number"> whatwg/html#11395
- Gecko accepts non-conforming full-width digits in <input type="number"> whatwg/html#11405
Metadata
Metadata
Assignees
Labels
No labels