-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dirname should work with more input types #9225
Comments
cc @whatwg/forms |
https://html.spec.whatwg.org/#bidi-rendering says
While this doesn't say that users are expected to be able to change the directionality for these elements, it seems inconsistent to support author-provided directionality but only allow users to change directionality for a subset, or to allow changing directionality but then not submitting it with
Relatedly, https://html.spec.whatwg.org/#persisted-user-state-restoration also says to (optionally) restore
This note should probably be updated if we allow |
PR at #9490 Is there interest from WebKit and Chromium? |
Yeah this seems reasonable. |
Also consistently sort the Telephone state before the URL state. Fixes #9225. Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Many thanks! |
Also consistently sort the Telephone state before the URL state. Fixes whatwg#9225. Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
I'm wondering why
tel
andhidden
types are excluded from working withdirname
.I'm inclined to think that it would be particularly useful to pass on information that a telephone number should be stored or handled as a LTR sequence so that it can be correctly rendered elsewhere – telephone numbers are one of the key areas where users struggle with bidi rendering, because they typically only include weak directional characters.
I could also imagine text being passed to a database via a hidden input element that may be directionally-sensitive, in which case dirname may be useful.
This may also apply to
email
andurl
types. If a person's email address is mostly in Arabic (پبتث@شجغ.sa), it may be good to store metadata about the direction set by the user when typing in the address, so that it can be rendered right to left in another location. Such an address will look very different in a LTR context.A field set to RTL by the user while typing their email address:
The same email address retrieved from a database and rendered without correction of the base direction in a LTR page:
The text was updated successfully, but these errors were encountered: