diff --git a/templates/repo/issue/view_content/context_menu.tmpl b/templates/repo/issue/view_content/context_menu.tmpl
index f020a9ea4b..5fc5af400f 100644
--- a/templates/repo/issue/view_content/context_menu.tmpl
+++ b/templates/repo/issue/view_content/context_menu.tmpl
@@ -1,4 +1,4 @@
-
+
diff --git a/templates/repo/issue/view_content/reactions.tmpl b/templates/repo/issue/view_content/reactions.tmpl
index da6319667b..e5cb9a8ed3 100644
--- a/templates/repo/issue/view_content/reactions.tmpl
+++ b/templates/repo/issue/view_content/reactions.tmpl
@@ -2,9 +2,18 @@
{{range $key, $value := .Reactions}}
{{$hasReacted := $value.HasUser $.ctxData.SignedUserID}}
+
{{svg "octicon-mention"}}
{{svg "octicon-cross-reference"}}
-
+
{{if .EasyMDE}}
{{end}}
diff --git a/tests/e2e/issue-comment.test.e2e.ts b/tests/e2e/issue-comment.test.e2e.ts
index f493f64506..4fce16764b 100644
--- a/tests/e2e/issue-comment.test.e2e.ts
+++ b/tests/e2e/issue-comment.test.e2e.ts
@@ -11,6 +11,19 @@ test.beforeAll(async ({browser}, workerInfo) => {
await login_user(browser, workerInfo, 'user2');
});
+test('Menu accessibility', async ({browser}, workerInfo) => {
+ const page = await login({browser}, workerInfo);
+ await page.goto('/user2/repo1/issues/1');
+ await expect(page.getByLabel('user2 reacted eyes. Remove eyes')).toBeVisible();
+ await expect(page.getByLabel('reacted laugh. Remove laugh')).toBeVisible();
+ await expect(page.locator('#issue-1').getByLabel('Comment menu')).toBeVisible();
+ await expect(page.locator('#issue-1').getByRole('heading').getByLabel('Add reaction')).toBeVisible();
+ page.getByLabel('reacted laugh. Remove').click();
+ await expect(page.getByLabel('user1 reacted laugh. Add laugh')).toBeVisible();
+ page.getByLabel('user1 reacted laugh.').click();
+ await expect(page.getByLabel('user1, user2 reacted laugh. Remove laugh')).toBeVisible();
+});
+
test('Hyperlink paste behaviour', async ({browser}, workerInfo) => {
test.skip(['Mobile Safari', 'Mobile Chrome', 'webkit'].includes(workerInfo.project.name), 'Mobile clients seem to have very weird behaviour with this test, which I cannot confirm with real usage');
const page = await login({browser}, workerInfo);
diff --git a/web_src/js/modules/tippy.js b/web_src/js/modules/tippy.js
index 83b28e5745..887e7194d9 100644
--- a/web_src/js/modules/tippy.js
+++ b/web_src/js/modules/tippy.js
@@ -103,7 +103,10 @@ function switchTitleToTooltip(target) {
}
}
target.setAttribute('data-tooltip-content', title);
- target.setAttribute('aria-label', title);
+ // only replace if not explicitly set
+ if (target.getAttribute('aria-label') !== null) {
+ target.setAttribute('aria-label', title);
+ }
// keep the attribute, in case there are some other "[title]" selectors
// and to prevent infinite loop with which will re-add
// title if it is absent