forgejo/templates/repo/diff
delvh e95b42e187
Improve accessibility when (re-)viewing files (#24817)
Visually, nothing should have changed.
Changes include
- Convert most `<a [no href]>` to `<button>` when (re-)viewing files:
- `<a [no href]>` are, by HTML definition, not a link and hence cannot
be focused
- `<a class="ui button">` can now be clicked (again?) using
<kbd>Enter</kbd>
- Previously, the installed keypress handler on `.ui.button` elements
disabled it for links somehow
- The `(un)escape file`, the `expand section` and the `expand/collapse
file` buttons can now be focused (and subsequently clicked using only
the keyboard)
- You can now press <kbd>Space</kbd> on a focused `View file` checkbox
to mark the file as viewed.
- previously, this was impossible as this checkbox listened on the wrong
event listener

The `add code comment` button has been left inaccessible for now as it
requires quite a bit of extra logic so that it is unhidden when it is
focused (you can otherwise focus it without seeing it as you are not
hovering on the corresponding line).

---------

Co-authored-by: silverwind <me@silverwind.io>
2023-05-21 20:47:41 +00:00
..
blob_excerpt.tmpl Improve accessibility when (re-)viewing files (#24817) 2023-05-21 20:47:41 +00:00
box.tmpl Improve accessibility when (re-)viewing files (#24817) 2023-05-21 20:47:41 +00:00
comment_form.tmpl Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876) 2023-04-03 18:06:57 +08:00
comment_form_datahandler.tmpl Make sure fmt catches all templates (#20979) 2022-08-31 23:58:54 +08:00
comments.tmpl Fix issue attachment handling (#24202) 2023-04-20 02:39:44 -04:00
compare.tmpl Remove fluid on compare diff page (#24627) 2023-05-10 08:46:17 +00:00
conversation.tmpl Start cleaning the messy ".ui.left / .ui.right", improve label list page, fix stackable menu (#24393) 2023-04-29 07:35:59 -04:00
csv_diff.tmpl Fix CSV diff for added/deleted files (#21189) 2022-09-17 10:45:32 +08:00
escape_title.tmpl Switch Unicode Escaping to a VSCode-like system (#19990) 2022-08-13 19:32:34 +01:00
image_diff.tmpl Improve "new-menu" (#24465) 2023-05-01 12:08:37 -04:00
new_comment.tmpl Do not reload page after adding comments in Pull Request reviews (#13877) 2021-01-08 23:49:55 +02:00
new_review.tmpl Add markdown preview to Submit Review Textarea (#24672) 2023-05-12 10:53:41 +00:00
options_dropdown.tmpl Expand/Collapse all changed files (#23639) 2023-04-09 21:11:02 +08:00
section_code.tmpl Switch Unicode Escaping to a VSCode-like system (#19990) 2022-08-13 19:32:34 +01:00
section_split.tmpl Improve accessibility when (re-)viewing files (#24817) 2023-05-21 20:47:41 +00:00
section_unified.tmpl Improve accessibility when (re-)viewing files (#24817) 2023-05-21 20:47:41 +00:00
stats.tmpl Group template helper functions, remove Printf, improve template error messages (#23982) 2023-04-08 21:15:22 +08:00
whitespace_dropdown.tmpl Fix incorrect toggle buttons (#23676) 2023-03-26 20:06:11 +08:00