gitea/templates/repo/issue/view_content
wxiaoguang 345aa09756
Fix aria.js bugs: incorrect role element problem, mobile focus problem, tippy problem (#23450)
This PR is extracted from #23346 to address some unclear (I don't
understand) code-belonging concerns.

This PR needs to be backported, otherwise the `aria.js` is too buggy in
some cases. Since there would be two minor conflicts, I will do the
backport manually.

Before: the `aria.js` is still buggy in some cases.

After: tested with AppleVoice, Android TalkBack

* Fix incorrect dropdown init code
* Fix incorrect role element (the menu role should be on the `$menu`
element, but not on the `$focusable`)
* Fix the focus-show-click-hide problem on mobile. Now the language menu
works as expected
* Fix incorrect dropdown template function setting
* Clarify the logic in aria.js
* Hide item's tippy after menu gets hidden
* Fix incorrect tippy `setProps` after `destroy`
* Fix UI lag problem when page gets redirected during menu hiding
animation with screen reader
* Improve comments
* Implement the layout proposed by #19861

<details>


d74a7efb60/web_src/js/features/aria.md (L38-L47)

</details>
2023-03-17 11:08:05 +08:00
..
add_reaction.tmpl Fix aria.js bugs: incorrect role element problem, mobile focus problem, tippy problem (#23450) 2023-03-17 11:08:05 +08:00
attachments.tmpl Refactor ctx in templates (#23105) 2023-03-02 11:44:06 -06:00
comments_delete_time.tmpl Convert <div class="button"> to <button class="button"> (#23337) 2023-03-14 11:34:09 +08:00
comments.tmpl Add context when rendering labels or emojis (#23281) 2023-03-05 22:59:05 +01:00
context_menu.tmpl Fix aria.js bugs: incorrect role element problem, mobile focus problem, tippy problem (#23450) 2023-03-17 11:08:05 +08:00
pull_merge_instruction.tmpl Refactor hiding-methods, remove jQuery show/hide, remove .hide class, remove inline style=display:none (#22950) 2023-02-19 12:06:14 +08:00
pull.tmpl Convert <div class="button"> to <button class="button"> (#23337) 2023-03-14 11:34:09 +08:00
reactions.tmpl Refactor ctx in templates (#23105) 2023-03-02 11:44:06 -06:00
reference_issue_dialog.tmpl Make sure fmt catches all templates (#20979) 2022-08-31 23:58:54 +08:00
sidebar.tmpl Allow both fullname and username search when DEFAULT_SHOW_FULL_NAME is true (#23463) 2023-03-16 11:32:25 -05:00
update_branch_by_merge.tmpl Convert <div class="button"> to <button class="button"> (#23337) 2023-03-14 11:34:09 +08:00