[openstreetmap/openstreetmap-website] Add dir=auto to text inputs (PR #3430)
Andy Allan
notifications at github.com
Thu Jan 20 15:37:08 UTC 2022
> we would need to be able to override it when we don't want it.
Yep. I expect if there was a default set via the rails helpers it would still be overridden by the options hash when the helper is used, so we can add the `dir` to the one or two cases that need it (basically the inverse of what we have here).
> (latitude and longitude for user positions for example)
text_fields used for numbers should be fine, since with dir="auto" they are actually better laid out for negative numbers than currently. In dir="rtl" the negative sign is shown to the right (before) the number, but in arabic the [negative should be shown to the left](https://en.wikipedia.org/wiki/Modern_Arabic_mathematical_notation). Both dir="auto" and dir="ltr" do the right thing here.
(If anyone has a contra-example for an RTL language that shows regular numerals differently, then I'd love to hear about it - I can't speak or read any RTL languages myself so my knowledge is limited to what I read online).
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3430#issuecomment-1017633060
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3430/c1017633060 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220120/cf5eaa67/attachment.htm>
More information about the rails-dev
mailing list