forgejo/templates
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
..
admin Convert <div class="button"> to <button class="button"> (#23337) 2023-03-14 11:34:09 +08:00
api/packages/pypi Add Package Registry (#16510) 2022-03-30 16:42:47 +08:00
base Fix aria.js bugs: incorrect role element problem, mobile focus problem, tippy problem (#23450) 2023-03-17 11:08:05 +08:00
code Fix 'View File' button in code search (#23478) 2023-03-14 22:19:27 -04:00
custom Add footer extra links template (#9576) 2020-01-03 20:41:56 +02:00
explore Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
mail Revert relative links to absolute links in mail templates (#23267) 2023-03-03 22:43:30 +08:00
org Convert <div class="button"> to <button class="button"> (#23337) 2023-03-14 11:34:09 +08:00
package Convert <div class="button"> to <button class="button"> (#23337) 2023-03-14 11:34:09 +08:00
projects Convert <div class="button"> to <button class="button"> (#23337) 2023-03-14 11:34:09 +08:00
repo Fix aria.js bugs: incorrect role element problem, mobile focus problem, tippy problem (#23450) 2023-03-17 11:08:05 +08:00
shared Fix due date being wrong on issue list (#23475) 2023-03-14 15:55:49 -05:00
status Move helpers to be prefixed with gt- (#22879) 2023-02-13 17:59:59 +00:00
swagger Add absent repounits to create/edit repo API (#23500) 2023-03-16 12:30:42 -05:00
user Refactor dashboard repo list to Vue SFC (#23405) 2023-03-14 12:09:06 +08:00
home.tmpl Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00
install.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
post-install.tmpl Fix various bugs for "install" page (#23194) 2023-03-04 10:12:02 +08:00