[openstreetmap/openstreetmap-website] Set dir="auto" on most form inputs (Issue #3431)
Andy Allan
notifications at github.com
Thu Jan 20 12:03:43 UTC 2022
As part of #3427 (and as a direct follow-on from #3420) we should set dir="auto" on most form inputs. This is because it's perfectly reasonable for someone to have their preferred language set to one direction yet be writing text in another (e.g. they have their preferred language set to Arabic, but are responding to a changeset comment in English).
We need to check if there are any exceptions to this. rtlstying [discusses form inputs](https://rtlstyling.com/posts/rtl-styling#form-inputs) but in the context of using LTR (for emails) in an RTL page without mentioning dir="auto". I made some brief experiments using RTL before the @ symbols with LTR after and that becomes a mess with "auto". So I think hard-coding LTR on email address inputs could be preferred, but if anyone knows better how email is typically handled in RTL then do let me know.
We don't have any phone number fields, and our number-only fields (for e.g. export) should work fine with auto.
I'd like to set this up so that other openstreetmap-website developers (now and in the future) don't have to remember to set this on every form field. So I think we should look at what field types are appropriate for this to be set on, and figure out how to make it happen by default, e.g. by overriding the rails default form helpers.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/3431
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/3431 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220120/7ac200a7/attachment.htm>
More information about the rails-dev
mailing list