You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/options/locale
wxiaoguang d4f35bd681
Use a general approch to improve a11y for all checkboxes and dropdowns. (#23542)
This PR follows #22599 and #23450

The major improvements:

1. The `aria-*.js` are totally transparent now, no need to call
`attachDropdownAria` explicitly anymore.
* It hooks the `$.fn.checkbox` and `$.fn.dropdown`, then our patch
works.
* It makes all dynamically generated checkbox/dropdown work with a11y
without any change
* eg: the `conversation.find('.dropdown').dropdown();` in `repo-diff.js`
2. Since it's totally transparent now, it could be easier to modify or
remove in the future.
3. It handles all selection labels as well (by onLabelCreate), so it
supports "multiple selection dropdown" now.
* It partially completes one of my TODOs: `TODO: multiple selection is
not supported yet.`
4. The code structure is clearer, code blocks are splitted into
different functions.
* The old `attachOneDropdownAria` was splitted into separate functions.
* It makes it easier to add more fine tunes in the future, and co-work
with contributors.
6. The code logic is similar as before, only two new parts: 
    1. the `ariaCheckboxFn` and `ariaDropdownFn` functions
    2. the `onLabelCreate` and `updateSelectionLabel` functions

In `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.
1 year ago
..
TRANSLATORS Fix missing left and right carets in TRANSLATORS (#21397) 2 years ago
locale_cs-CZ.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_de-DE.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_el-GR.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_en-US.ini Use a general approch to improve a11y for all checkboxes and dropdowns. (#23542) 1 year ago
locale_es-ES.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_fa-IR.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_fi-FI.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_fr-FR.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_hu-HU.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_id-ID.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_is-IS.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_it-IT.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_ja-JP.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_ko-KR.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_lv-LV.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_nl-NL.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_pl-PL.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_pt-BR.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_pt-PT.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_ru-RU.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_si-LK.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_sk-SK.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_sv-SE.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_tr-TR.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_uk-UA.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_zh-CN.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_zh-HK.ini [skip ci] Updated translations via Crowdin 1 year ago
locale_zh-TW.ini [skip ci] Updated translations via Crowdin 1 year ago