<input type=tel> does not follow the HTML standard for directionality and :dir() pseudo-class
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: zcorpan, Assigned: jfkthame)
References
Details
Attachments
(1 file)
Test: https://github.com/web-platform-tests/wpt/pull/25599
Firefox fails this test. It doesn't seem to implement this part of the spec:
If the element is an input element whose type attribute is in the Telephone state, and the dir attribute is not in a defined state (i.e. it is not present or has an invalid value)
The directionality of the element is 'ltr'.
https://html.spec.whatwg.org/multipage/dom.html#the-directionality
Here's a simpler demo: http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=8479
<!DOCTYPE html>
<span dir=rtl>
<input type=tel id=tel>
</span>
<script>
w(tel.matches(':dir(ltr)') ? 'PASS' : 'FAIL');
</script>
Comment 1•4 years ago
|
||
Related code is SetDirectionFromValue I suspect...
Comment 2•4 years ago
|
||
Do you know out of curiosity what's the reasoning for making <input type=tel>
special?
Reporter | ||
Comment 3•4 years ago
|
||
Reporter | ||
Comment 4•4 years ago
|
||
Also note this part of the Rendering section:
[dir]:dir(ltr), bdi:dir(ltr), input[type=tel i]:dir(ltr) { direction: ltr; }
https://html.spec.whatwg.org/multipage/rendering.html#bidi-rendering
I haven't written a wpt test for this, but it seems none of Gecko, WebKit, Chromium get this right. See demo: http://software.hixie.ch/utilities/js/live-dom-viewer/saved/8485
Comment 5•4 years ago
|
||
Firefox fails this test. It doesn't seem to implement this part of the spec:
I'm seeing the same behavior on Blink and WebKit too, are we proposing a new change?
Reporter | ||
Comment 6•4 years ago
|
||
The spec change was from 2013, but it seems it hasn't been implemented yet.
Assignee | ||
Comment 7•2 years ago
|
||
I don't really know if it's the right place to fix this, but it looks like we can handle it in RecomputeDirectionality
.
Assignee | ||
Comment 8•2 years ago
|
||
Updated•2 years ago
|
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/37b80bf4bf5a Implement the HTML spec special-case of directionality for <input type=tel>. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/36989 for changes under testing/web-platform/tests
Comment 11•2 years ago
•
|
||
Backed out for causing multiple StyleSheet related failures
This only seems to be happening on debug platform
Upstream PR was closed without merging
Comment 13•2 years ago
|
||
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b8c51f8839e6 Implement the HTML spec special-case of directionality for <input type=tel>. r=emilio
Comment 14•1 year ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Updated•1 year ago
|
Description
•