
silverwindandwxiaoguang
78eb95ab19
fix: enable more djlint rules and improve keyboard navigation (#40081)
Enable djlint's [H018](https://djlint.com/docs/linter/#h018),
[H046](https://djlint.com/docs/linter/#h046) and
[H054](https://djlint.com/docs/linter/#h054) rules, fix their findings
and the keyboard navigation problems around them. H054 found links
nested in `<button>` dropdowns and radio inputs nested in links, both
invalid HTML.
- "Add File" and "More Operations" in the repo file list become `div`
dropdowns, the disabled state stays unfocusable
- The diff whitespace menu marks the current option with a check and
`aria-current` instead of radios, which made our dropdown aria patch
announce it as a combobox
- Sign-in moves "Forgot password?" below "Sign In" and drops the
positive tabindexes from https://github.com/go-gitea/gitea/pull/31689,
so the tab order follows the DOM: username, password, remember, sign in,
forgot
- The focus ring on primary, red and green buttons is near-white on dark
themes and near-black on light ones, the primary-colored ring was
invisible on primary buttons
<img width="500" alt="Whitespace menu, before and after"
src="https://github.com/user-attachments/assets/d22a423d-95e5-434c-aec4-59264c7132b7"
/>
<img width="600" alt="Sign-in form, main and this PR"
src="https://github.com/user-attachments/assets/d6780690-d906-4791-8a2b-8d80fb03067a"
/>
<img width="215" height="132" alt="Keyboard-focused primary and red
buttons, dark and light theme"
src="https://github.com/user-attachments/assets/a2400b18-4802-4383-8560-7e8267a7f02f"
/>
---------
Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-11-03 15:30:59 +00:00
..
2026-10-20 12:32:27 +02:00
2026-10-20 15:04:10 +02:00
2026-10-02 22:21:41 +08:00
2026-10-03 02:28:34 +00:00
2026-03-29 10:24:30 +00:00
2026-09-26 07:20:39 +00:00
2026-03-21 15:39:47 -07:00
2026-07-08 00:16:32 +00:00
2026-10-20 12:32:27 +02:00
2026-09-06 14:43:49 +08:00
2026-01-24 11:30:47 +00:00
2026-06-21 08:07:13 +02:00
2026-10-20 12:32:27 +02:00
2026-05-29 23:50:55 +00:00
2026-05-21 07:39:09 +00:00
2025-01-16 04:26:17 +08:00
2026-09-05 10:01:27 +00:00
2026-09-24 20:23:15 +00:00
2025-04-15 22:35:22 +08:00
2026-04-20 07:22:05 +00:00
2026-08-03 04:40:02 +00:00
2026-08-02 13:19:57 +00:00
2026-09-23 23:14:31 +00:00
2026-02-22 22:56:33 +00:00
2026-10-29 05:18:17 +00:00
2025-12-03 02:13:16 +00:00
2026-10-18 13:59:51 +00:00
2026-08-17 17:43:34 +00:00
2026-08-17 17:43:34 +00:00
2026-10-23 01:53:45 +00:00
2026-08-31 04:12:25 -07:00
2026-03-29 10:24:30 +00:00
2026-08-31 04:12:25 -07:00
2026-06-28 10:53:01 +00:00
2026-09-27 18:30:42 +00:00
2026-10-20 12:32:27 +02:00
2026-10-18 13:59:51 +00:00
2026-09-26 07:20:39 +00:00
2025-03-24 20:26:58 -07:00
2026-11-01 12:47:10 +00:00
2026-08-31 04:12:25 -07:00
2026-10-29 23:57:51 +00:00
2026-09-06 14:43:49 +08:00
2024-07-07 15:32:30 +00:00
2026-10-03 00:47:13 +00:00
2026-06-21 08:07:13 +02:00
2026-08-31 04:12:25 -07:00
2026-10-20 12:32:27 +02:00
2026-10-14 12:07:31 +00:00
2026-10-14 12:07:31 +00:00
2026-10-18 13:59:51 +00:00
2026-08-31 04:12:25 -07:00
2026-03-31 10:03:52 +08:00
2026-09-26 07:20:39 +00:00
2026-03-31 10:03:52 +08:00
2026-10-12 17:46:15 +00:00
2026-10-20 12:32:27 +02:00
2026-10-18 13:59:51 +00:00
2025-12-03 02:13:16 +00:00
2026-10-08 10:36:08 +02:00
2025-12-03 02:13:16 +00:00
2026-10-18 13:59:51 +00:00
2026-10-20 12:32:27 +02:00
2026-09-26 07:20:39 +00:00
2026-10-22 01:48:49 +00:00
2026-06-11 17:33:21 +00:00
2026-09-14 13:18:00 +00:00
2026-04-20 07:22:05 +00:00
2026-10-18 13:59:51 +00:00
2026-08-17 20:08:15 +00:00
2025-12-03 02:13:16 +00:00
2026-09-26 07:20:39 +00:00
2026-08-09 10:54:31 +00:00
2026-08-31 04:12:25 -07:00
2025-12-03 02:13:16 +00:00
2026-10-29 05:18:17 +00:00
2025-12-03 02:13:16 +00:00
2026-09-24 20:23:15 +00:00
2026-11-03 15:30:59 +00:00
2026-04-01 12:50:57 +00:00
2026-10-18 13:59:51 +00:00