[openstreetmap/openstreetmap-website] Apply lang attribute to localized name:* values (#6834) (PR #6854)

Arpan Mukherjee notifications at github.com
Tue Mar 3 15:37:14 UTC 2026


### Description

Adds a `lang` attribute to localized tag values (e.g. `name:fr`, `name:ja`, `alt_name:de`) in the element Tags table.

The language code is extracted from the tag key and applied to the `<td>` element. This allows browsers to select appropriate fonts and improves accessibility for screen readers.

### How has this been tested?

Tested locally by viewing elements with localized tags such as:

- `name:fr`
- `name:ja`
- `name:zh-Hans`

Verified that the rendered `<td>` includes the correct `lang` attribute.

Closes #6834
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/6854

-- Commit Summary --

  * Apply lang attribute to localized name:* values (#6834)

-- File Changes --

    M app/views/browse/_tag.html.erb (15)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/6854.patch
https://github.com/openstreetmap/openstreetmap-website/pull/6854.diff

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

Message ID: <openstreetmap/openstreetmap-website/pull/6854 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260303/f475cc59/attachment.htm>


More information about the rails-dev mailing list