
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-30 21:41:59 +00:00
2026-10-20 12:32:27 +02:00
2026-10-20 12:32:27 +02:00
2026-09-08 23:17:17 +00:00
2026-11-03 15:30:59 +00:00
2026-10-15 23:09:41 +00:00
2026-06-08 17:16:22 +00:00
2026-10-20 12:32:27 +02:00
2026-09-27 18:30:42 +00:00
2026-11-03 15:30:59 +00:00
2026-10-31 14:51:43 +00:00
2026-10-23 01:53:45 +00:00
2026-09-08 23:17:17 +00:00
2026-10-20 15:04:10 +02:00
2026-10-28 09:19:35 +00:00
2026-10-20 12:32:27 +02:00
2026-10-20 12:32:27 +02:00
2026-04-23 13:58:31 +00:00
2026-09-08 23:17:17 +00:00
2026-08-06 05:45:31 +00:00
2026-09-08 23:17:17 +00:00
2026-11-01 12:47:10 +00:00
2024-04-17 08:31:37 +00:00
2026-09-08 23:17:17 +00:00
2026-10-20 12:32:27 +02:00
2026-06-08 17:16:22 +00:00
2026-10-30 20:18:13 +00:00
2026-10-30 20:18:13 +00:00
2026-09-08 23:17:17 +00:00
2026-01-01 10:32:19 -08:00
2024-03-14 23:24:59 +00:00
2026-10-21 04:12:18 +00:00
2025-01-15 11:15:47 +08:00
2026-05-29 23:50:55 +00:00
2024-02-25 14:02:20 +00:00
2026-10-18 13:59:51 +00:00
2026-07-17 05:17:28 +00:00
2026-08-27 15:31:20 +00:00
2025-06-21 12:27:25 -07:00
2026-09-08 23:17:17 +00:00
2026-10-07 13:35:38 +08:00
2026-08-22 08:59:37 +00:00
2026-10-03 02:28:34 +00:00
2025-07-10 17:17:56 +00:00
2025-04-24 09:11:54 +08:00
2026-09-08 23:17:17 +00:00
2025-03-29 13:26:41 +08:00
2023-07-06 18:59:24 +00:00
2026-07-01 11:17:23 +00:00
2024-04-17 08:31:37 +00:00
2026-08-31 23:31:17 +00:00
2026-09-18 12:43:36 +00:00
2024-03-14 23:24:59 +00:00
2025-01-24 17:35:28 +00:00
2026-09-08 23:17:17 +00:00
2026-09-05 10:01:27 +00:00
2026-09-18 12:43:36 +00:00
2026-11-03 15:30:59 +00:00
2025-11-30 11:58:15 +08:00
2026-09-08 23:17:17 +00:00
2026-09-08 23:17:17 +00:00
2026-07-15 17:30:01 +00:00
2025-11-30 11:58:15 +08:00
2026-10-20 12:32:27 +02:00
2023-04-29 15:43:01 -04:00