-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Proposal] Improve the dropdown step by step #23345
Comments
Native select is probably a good first step, but I recommend putting it into a separate go subtemplate so it can easily be replaced/extended later where only 1 file needs to be edited instead of 50+. Ideally that subtemplate would take a dict of options instead of a inflexible argument list. |
Follow: * #23345 The branch/tag selector dropdown mixes jQuery/Fomantic UI/Vue together, it's very diffcult to maintain and causes unfixable a11y problems. It also causes problems like #19851 #21314 #21952 This PR is the first step for the refactoring, move `data-` attributes to JS object and use Vue data as much as possible. The old selector `'.choose.reference .dropdown'` was also wrong, it hits `<div class="choose reference"><svg class="dropdown icon">` and would cause undefined behaviors. I have done some quick tests and it works. After this PR gets merged, I will move the code into a Vue SFC in next PR. ![image](https://user-images.githubusercontent.com/2114189/224099638-378a8a86-0865-47d1-bcba-f972506374c7.png) ![image](https://user-images.githubusercontent.com/2114189/224099690-70276cf5-b1e4-404a-b0c6-582448abf40e.png) --------- Co-authored-by: techknowlogick <[email protected]>
There's also a web standard proposal for |
The plan is utopia but I don't want to spend time on it at the moment. |
The Problem
Gitea uses Fomantic UI Dropdown heavily, but the dropdown has many unfixable problems and already causes a lot of bugs for a11y.
The root problem is that Fomantic Dropdown was designed to be used for many different purposes (as much as possible ...)
<select>
, used in many formsAnd Fomantic Dropdown requires that the focus must be on its primary element, see aria.md. If the focus changes, it hides or panics. If we treat the dropdown as a single element, the focusing behavior is fine, but if the dropdown is used for complex interaction, it would cause problems.
Before:
aria.js
could fix many a11y related problems and it even works with screen readers. However, the ending time of that hacky patch comes sooner or later.Some following fixes:
The Future
<select>
as much as possibleThe text was updated successfully, but these errors were encountered: