From 3496c819da1c0cb53f24606aa7c678ab09f50965 Mon Sep 17 00:00:00 2001 From: Otto Richter Date: Mon, 30 Dec 2024 16:06:18 +0100 Subject: [PATCH] Fix issue/comment menus Closes https://codeberg.org/forgejo/forgejo/issues/1120 - Adds labels to reaction and context menu. - Fixes taborder in markdown combobox buttons. They are now only one "tab" stop and can be navigated with arrow buttons and in the right order (previously, it would skip the table button). - Generates more verbose output for the reactio selectors to provide content for users who cannot identify the meaning of these buttons visually. Explicit aria-labels are now preferred over auto-generated ones. (cherry picked from commit c67d63d88a77f81b3f79b75642624b3457d4e8b6) --- options/locale/locale_en-US.ini | 6 ++++++ .../repo/issue/view_content/add_reaction.tmpl | 2 +- .../repo/issue/view_content/context_menu.tmpl | 2 +- templates/repo/issue/view_content/reactions.tmpl | 15 ++++++++++++--- templates/shared/combomarkdowneditor.tmpl | 4 ++-- tests/e2e/issue-comment.test.e2e.ts | 13 +++++++++++++ web_src/js/modules/tippy.js | 5 ++++- 7 files changed, 39 insertions(+), 8 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 5a89662cb2..44d1e0e61d 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1633,6 +1633,12 @@ issues.num_reviews_one = %d review issues.num_reviews_few = %d reviews issues.commented_at = `commented %s` issues.delete_comment_confirm = Are you sure you want to delete this comment? +issues.reaction.add = Add reaction +issues.reaction.alt_few = %[1]s reacted %[2]s. +issues.reaction.alt_many = %[1]s and %[2]d more reacted %[3]s. +issues.reaction.alt_remove = Remove %[1]s reaction from comment. +issues.reaction.alt_add = Add %[1]s reaction to comment. +issues.context.menu = Comment menu issues.context.copy_link = Copy link issues.context.quote_reply = Quote reply issues.context.reference_issue = Reference in a new issue diff --git a/templates/repo/issue/view_content/add_reaction.tmpl b/templates/repo/issue/view_content/add_reaction.tmpl index 37931f287e..5d4aa2298e 100644 --- a/templates/repo/issue/view_content/add_reaction.tmpl +++ b/templates/repo/issue/view_content/add_reaction.tmpl @@ -1,5 +1,5 @@ {{if .ctxData.IsSigned}} -