-
-
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
Repair some Gitea accessibility issues #21964
Conversation
This looks like a bunch of good changes, sorry for not picking it up earlier. Maybe @wxiaoguang can have a look too. |
This comment was marked as outdated.
This comment was marked as outdated.
Yeah I already commented above on the unnecessary IDs. If we can get the rendering to work with nesting, it's definitely the way to go. If this change is too massive, I would suggest factoring it out into a separate PR to ease review here. |
I don't understand why you say unnecessary IDs everywhere, are all those IDs added by aria.js unnecessary? If they are unnecessary, why are they added? If the current markup of this input+labels pair are not accessible, why would it be more difficult to change them with id+for attributes added towards a nested schema? sounds illogical; that's a deep change with or without attributes, includes templates, css and UI framework.
In the future for a11y solutions is practically never. Why not implement accessible solutions as soon as possible? In many institutions it is essential to provide accessibility, even in financial institutions, so why is it seemingly unnecessary here? |
This comment was marked as outdated.
This comment was marked as outdated.
I will do my best effort to provide accessibility.
So developers will never have to deal with IDs nor ARIA stuff in templates, but they have to develop that intermediate framework you propose, dealing with IDs and ARIA stuff on pure javascript. The problem I see is who is going to develop that intermediate framework if, in your words, developers aren't called to deal with ARIA stuff? Also, developers will have to choose a good UI framework that provide good accessibility and implement that framework on top of gitea, but without knowing too much about a11y, it sounds a complex decision. Who, without knowing too much about a11y, are willing to choose a good UI framework like the one you describe for the whole frontend of gitea while ensuring accessibility? On the other hand, with your last statements, I start to understand that aria.js is a kind of prototype of that intermediate framework that frees developers from dealing with ARIA and IDs in templates and fixes foomantic UI bugs in dropdowns. But I have opened a bug a month ago and nobody (zero) person has even reacted (less confirmed) anything about it. What is the commitment to this approach? Finally, the checkboxes on the configuration page don't have an accessibility problem due to foomantic UI, it's a simple case of malformed html (not the only one in that template). If you want to preserve a malformed html template while you find a good framework fixing the html with javascript, well I'm not going to provide it. It's easy to see why checkboxes are siblings with their labels in foomantic (and in other frameworks like Vue, too). Adding the ID and FOR attrs is a straightforward native solution if you remove the fomantic UI from them. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
f8d4117
to
db91c60
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
3e1d027
to
9276255
Compare
9276255
to
5e9aa83
Compare
@wxiaoguang what do you think about this aria.js refactory proposal? |
This comment was marked as outdated.
This comment was marked as outdated.
@@ -661,7 +661,7 @@ | |||
{{end}} | |||
|
|||
<div class="text right actions"> | |||
<div class="ui cancel button">{{.locale.Tr "settings.cancel"}}</div> | |||
<button class="ui cancel button">{{.locale.Tr "settings.cancel"}}</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f5dec26
to
d5555fb
Compare
done
Unfortunately, that approach is totally insufficient IMO. There are more structures than those two. In fact, the unique selectors which match a menu pattern are the reactions menu and the comment options menu (the only pair you didn't fix with aria.js at the beginning, btw). You can check this statement using the Axe DevTools extension with a fomantic dropdown opened. The majority of dropdowns have a kind of label in the middle incompatible with a menu pattern and have noise produced by elements as options headers and dividers which I am addressing here. As I said in Forgejo Dropdowns UX bug some days ago, keep talking about This is the reason why I chosen to do specific identification of aria roles via The language selector is pretty close to be accessible, but auto-submit is a bad practice which can produce annoying interactions if you choose bad your desired language. Ideally you should be able to choose your language and then submit it to change the UI with clarity that the choosing was made without a mistake. That's the reason why combobox has a fillable field. If you want just a menu structure, you should put the current language label out of the selector or remove the label and only mark the current language in the corresponding menuitem (as a native selector does).
done
I made a change here that needs to wait a merge of that pull request or be reverted because is failing currently in the cancel button of the locking issue modal.
Agreed. I just opted to conserve classes. Is now removed.
That's what I said above. If you implement combobox based in
Perfect, but you should need to remove the label inside because is out of that pattern as I explained above with language selector.
It depends. Several dropdowns have the
This reversion was already integrated today. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
More proofs about "why the language dropdown should be a menu (at the moment)".
Take a look at W3 standard:
And take a look at Apple's page (maybe Apple also doesn't do perfectly, but they also use "menu") After a public discussion, the conclusion is: it's possible to always use "combobox", never use "menu" for Fomantic Dropdowns (it's doable and acceptable, while in my mind the "Create Repo" / "Profile" are menus - it doesn't matter). I marked my previous comments as Outdated. Update: although some of my recent PRs (#23450, #23542) conflict with your work, I never meant to "take over" your work or idea. I highly respect your work and idea, and I believe most of them are pretty valuable. My PRs are doing: fix my bugs, make the If you feel that: something in my PRs is wrong, or I missed something, or I need to mention something, or I should help to resolve the conflicts, don't hesitate to tell me. |
- Changed scope application of aria.js functions to apply it after all widgets are initialized. - Improve a11y structure of: - Reactions in issue/pr comments view. - Comment options in issue/pr comments view. - Milestone dropdown in repo issue/pr view. - Projects dropdown in repo issue/pr view. - Assignees dropdown in repo issue/pr view. - Reviewers dropdown in repo pr view. - Due date dropdown in repo issue/pr view. - Dependency dropdown in repo issue/pr view. - Reference copy button in repo issue/pr view. - Language selector. - Create... button. - Profile and settings... button. - Add label for some buttons. - Remove `dropdown` class to an svg which generates false positives
aa9b920
to
e3434b7
Compare
Stale for long time, I think I have been open and clear for this problem. Feel free to reopen or propose new PRs, thank you. |
Updated 2023-03-22 removing old ideas and merges done apart.
This PR is an improvement of #21743 taking the combobox+listbox ARIA design pattern as a better fit for some Fomantic dropdowns, with the addition of other a11y improvements.
The idea is to resolve the main problem described in #21742.
Changed foomantic dropdowns to the combobox+listbox ARIA design pattern
dropdown
class to an svg which generates false positives