[openstreetmap/openstreetmap-website] Language selection enhancements (PR #6412)

Pablo Brasero notifications at github.com
Wed Sep 24 15:35:21 UTC 2025


@pablobm commented on this pull request.



> +
+      if ($search.length) {
+        $search.off("input");
+        $search.on("input", function () {
+          const query = $(this).val().toLowerCase();
+          $(".language-item").each(function () {
+            const text = $(this).text().toLowerCase();
+            $(this).toggle(text.indexOf(query) > -1);
+          });
+        });
+      }
+    }
+  });
+
+  $("#select_language_dialog").on("shown.bs.modal", function () {
+    $("#language_search").val("").trigger("input");

Would it make sense to grab the focus so that the user can start typing straightaway?

```suggestion
    $("#language_search")
      .focus()
      .val("").trigger("input");
```

(I'm not an accessibility expert, so I might be proposing an a11y sin here).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6412#pullrequestreview-3263502205
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6412/review/3263502205 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250924/e8db0339/attachment.htm>


More information about the rails-dev mailing list