The Wayback Machine - https://web.archive.org/web/20220502233858/https://github.com/go-gitea/gitea/pull/15193
Skip to content
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

Remove vendored copy of fomantic-dropdown #15193

Merged
merged 3 commits into from Mar 30, 2021
Merged

Conversation

Copy link
Member

@silverwind silverwind commented Mar 29, 2021

jQuery 3.6.0 seems to have broke the dropdown focus handling (focus would get stuck on the dropdown) in this module which we have vendored on top of fomantic for accessibility improvements.

Either downgrading jQuery to 3.5.1 or removing the vendor copy seems to resolve the issue and I opted for removing the copy because I think such changes should be done upstream and the removal also lightens the JS by 155kB before minify/gzip.

Fixes: #15172
Ref: #8638
Ref: jquery/jquery#4813

jQuery 3.6.0 seems to have broke the dropdown focus handling (focus
would get stuck on the dropdown) in this module which we have vendored
on top of fomantic for accessibility improvements.

Either downgrading jQuery to 3.5.1 or removing the vendor copy seems to
resolve the issue and I opted for removing the copy because I think such
changes should be done upstream and the removal also lightens the JS by
155kB before minify/gzip.

Fixes: go-gitea#15172
6543
6543 approved these changes Mar 29, 2021
Copy link
Member

@a1012112796 a1012112796 left a comment

👍

@techknowlogick
Copy link

@techknowlogick techknowlogick commented Mar 30, 2021

Have these a11y fixes been upstreamed? I don't want to lose any accessibility by merging this.

@silverwind
Copy link
Author

@silverwind silverwind commented Mar 30, 2021

No, it was never followed up and it seems the original author also has no interest in upstreaming the patch. So yes, we'd loose some a11y with this removal, but I think it's overall a net gain to no longer have this crude way of patching fomantic (essentially it just runs another copy of the fomantic module on top of the already initialized original module, a recipe for disaster).

@6543 6543 merged commit 1b762fc into go-gitea:master Mar 30, 2021
2 checks passed
@silverwind silverwind deleted the fix-dropdown branch Mar 30, 2021
@henningoschwald
Copy link

@henningoschwald henningoschwald commented Apr 26, 2021

As expected this definitely breaks a11y for me using the Orca screenreader on Linux with Firefox, i.e. in the "create" drop-down in the main navigation. Tested with Gitea master from April 19th. Other browsers and screenreaders are affected too, of course. I really hope you don't intend to stick with this state and I wish you would give a11y a higher priority in general.

I am not deep enough into web development to come up with pull requests, but I would be available as a tester and I am able to build Gitea from sources.

@silverwind
Copy link
Author

@silverwind silverwind commented Apr 26, 2021

We are deeply dependant on Fomantic UI which was not created with accessiblity in mind. I think our best bet is to gradually replace it with something better, but I'm not sure what to replace it with.

Alternatively, we could again try to hack something up to add aria attributes after Dropdown creation via DOM modifaction. If someone could provide a example HMTL diff with such attributes, I'm sure something could be done.

@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

7 participants