[openstreetmap/openstreetmap-website] Avoid using positive tabindexes (PR #6823)

Andy Allan notifications at github.com
Wed Feb 18 19:04:56 UTC 2026


The use of positive tabindexes is widely discouraged. Instead, we should order the elements of the page in the same order as they are displayed, which they are already.

Previously the tab indexes did match the order that these elements were shown on the page, but the lack of tabindexes on certain other elements was used to "skip over" things like explanatory links in forms. This made these other elements hard to focus, and meant that overall the focus skipped around the page unintuitively.

It is less confusing for keyboard users if the focus just moves around in the same order that the elements are shown on the page, which is also the same order they appear in the html.

See https://herb-tools.dev/linter/rules/html-no-positive-tab-index and the list of references on that page, for further discussion.

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

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

-- Commit Summary --

  * Avoid using positive tabindexes

-- File Changes --

    M app/views/layouts/map.html.erb (2)
    M app/views/sessions/new.html.erb (8)
    M app/views/users/new.html.erb (11)

-- Patch Links --

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

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

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


More information about the rails-dev mailing list