@1ec5 commented on this pull request.


> +      $("<a>")
+        .attr("href", OSM.WIKIMEDIA_COMMONS_URL + "File:" + data.icon)
+        .append($("<img>").attr({ src: OSM.WIKIMEDIA_COMMONS_URL + 
"Special:FilePath/" + data.icon, height: "32" }))
+        .addClass("float-end mb-1 ms-2")
+        .appendTo(cell);
+    }
+    if (data.label) {
+      $btn
+        .siblings(`a[href*="wikidata.org/entity/${data.qid}"]`)
+        .clone()
+        .text(data.label)
+        .addClass("me-1")
+        .appendTo(cell);
+    }
+    if (data.article) {
+      $(`<${data.label ? "sup" : "div"}>`)

OK, that’s fair. I do see a lot of second- and third-party Wikidata tools 
labeling links like “Wikipedia [es]” as well, with the language code wrapped in 
an `<abbr>` tag that provides a tooltip for the human-readable language name. 
We don’t have any precedent for that in this codebase as far as I know, but 
personally I find it self-explanatory.

On that note, we should probably surround any foreign-language text with an 
element that specifies a `lang=` attribute for proper font selection and screen 
reader support.

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

Message ID: 
<openstreetmap/openstreetmap-website/pull/6127/review/2988350...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to