githaven/templates/repo/issue
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
..
fields Fix nil context in RenderMarkdownToHtml (#23092) 2023-02-24 14:36:07 +08:00
labels Convert <div class="button"> to <button class="button"> (#23337) 2023-03-14 11:34:09 +08:00
view_content Fix aria.js bugs: incorrect role element problem, mobile focus problem, tippy problem (#23450) 2023-03-17 11:08:05 +08:00
branch_selector_field.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
choose.tmpl Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00
comment_tab.tmpl Fix nil context in RenderMarkdownToHtml (#23092) 2023-02-24 14:36:07 +08:00
label_precolors.tmpl Fix purple color in suggested label colors (#18241) 2022-01-11 12:11:40 -06:00
labels.tmpl Convert <div class="button"> to <button class="button"> (#23337) 2023-03-14 11:34:09 +08:00
list.tmpl Allow both fullname and username search when DEFAULT_SHOW_FULL_NAME is true (#23463) 2023-03-16 11:32:25 -05:00
milestone_issues.tmpl Allow both fullname and username search when DEFAULT_SHOW_FULL_NAME is true (#23463) 2023-03-16 11:32:25 -05:00
milestone_new.tmpl Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00
milestones.tmpl Convert <div class="button"> to <button class="button"> (#23337) 2023-03-14 11:34:09 +08:00
navbar.tmpl Add some headings to repo views (#22869) 2023-02-12 20:20:12 +08:00
new_form.tmpl Allow both fullname and username search when DEFAULT_SHOW_FULL_NAME is true (#23463) 2023-03-16 11:32:25 -05:00
new.tmpl Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00
openclose.tmpl Move helpers to be prefixed with gt- (#22879) 2023-02-13 17:59:59 +00:00
search.tmpl Issues: add Project filter to issues list and search (#22544) 2023-01-29 11:45:29 +08:00
view_content.tmpl Change Close to either Close issue or Close pull request (#23506) 2023-03-16 23:11:31 +08:00
view_title.tmpl Convert <div class="button"> to <button class="button"> (#23337) 2023-03-14 11:34:09 +08:00
view.tmpl Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00