-
-
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
Use a general approch to improve a11y for all checkboxes and dropdowns. #23542
Conversation
f4ed870
to
25b702c
Compare
25b702c
to
f6216f1
Compare
For checkbox, I wonder if it wouldn't be better to move to native checkboxes instead (removing the fomantic module). It'll be the best solution and a11y is perfect for those and they don't need any extra JS work. |
Agree, but it really needs much more time, including implement the necessary CSS styles, rewrite related I have done my best to avoid the checkboxes becoming more complex, to make the future native-replacing not too difficult. |
I think I will get started on native checkbox styling as part of an effort the eliminate the checkbox "pop in" on the issue list. It's been annoying me for a while now. |
See #23596 for that. I think I will add styling, currently there is none. |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #23542 +/- ##
==========================================
- Coverage 47.14% 47.13% -0.02%
==========================================
Files 1149 1154 +5
Lines 151446 152353 +907
==========================================
+ Hits 71397 71808 +411
- Misses 71611 72057 +446
- Partials 8438 8488 +50
... and 38 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
* upstream/main: Use a general approch to improve a11y for all checkboxes and dropdowns. (go-gitea#23542) [skip ci] Updated translations via Crowdin Update PR documentation (go-gitea#23620) Set opaque background on markup and images (go-gitea#23578) Decouple the issue-template code from comment_tab.tmpl (go-gitea#23556) Remove `id="comment-form"` dead code, fix tag (go-gitea#23555) Introduce path Clean/Join helper functions (go-gitea#23495) Remove conflicting CSS rules on notifications, improve notifications table (go-gitea#23565) Remove @metalmatze as maintainer (go-gitea#23612) Keep (add if not existing) xmlns attribute for generated SVG images (go-gitea#23410)
This PR follows #22599 and #23450
The major improvements:
aria-*.js
are totally transparent now, no need to callattachDropdownAria
explicitly anymore.$.fn.checkbox
and$.fn.dropdown
, then our patch works.conversation.find('.dropdown').dropdown();
inrepo-diff.js
TODO: multiple selection is not supported yet.
attachOneDropdownAria
was splitted into separate functions.ariaCheckboxFn
andariaDropdownFn
functionsonLabelCreate
andupdateSelectionLabel
functionsIn
aria-dropdown.js
I had to mix jQuery and Vanilla JS somewhat, I think the code is still understandable, otherwise the code would be much more complex to read.Thanks to fsologureng for the idea about "improving the 'delete icon' with aria attributes".
If there is anything unclear or incorrect, feel free to ask and discuss, or propose new PRs for it.