Skip to content

Many images don't have an alt attribute #20606

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

Closed
delvh opened this issue Aug 1, 2022 · 3 comments · Fixed by #34263
Closed

Many images don't have an alt attribute #20606

delvh opened this issue Aug 1, 2022 · 3 comments · Fixed by #34263
Labels
topic/ui-interaction Change the process how users use Gitea instead of the visual appearance

Comments

@delvh
Copy link
Member

delvh commented Aug 1, 2022

Description

Currently, we have about 100 images that don't have an alt attribute (see below how that was calculated).
This is not the best idea for accessibility, i.e. in case the browser blocks the images, the internet connection is not good enough to load the pictures, the user uses a screen reader, …

Hence, we should probably add an alt tag for every icon and image.

The only question is: Do we translate (all | some | no) alt attributes? Do we always use the English version?
In favor of not translating would be the reduced effort to fix the problem and smaller binary size / file size.
Against it is that users probably want it translated.

So, what approach should we choose?

Screenshots

Use ag '<img' | grep -v 'alt' | grep -v 'aria-hidden' for a good estimate of where alt attributes are missing.

Gitea Version

1.18.0+dev-198-g4f14c6de1

Can you reproduce the bug on the Gitea demo site?

Yes

Operating System

Irrelevant

Browser Version

Irrelevant

@delvh delvh added type/bug topic/ui Change the appearance of the Gitea UI labels Aug 1, 2022
@delvh delvh changed the title Many image alt tags are missing Many image miss alt attributes Aug 2, 2022
@delvh delvh changed the title Many image miss alt attributes Many images don't have an alt attributes Aug 2, 2022
@delvh delvh changed the title Many images don't have an alt attributes Many images don't have an alt attribute Aug 2, 2022
@Gusted
Copy link
Contributor

Gusted commented Aug 2, 2022

The only question is: Do we translate (all | some | no) alt attributes? Do we always use the English version?
In favor of not translating would be the reduced effort to fix the problem and smaller binary size / file size.
Against it is that users probably want it translated.

It depends. I see a lot of logo's those just should be "{logo name} logo".
Some of them are loading/failed (for migration) images. They add no value for those using alt, so rather should be aria-hidden I assume.
Anything should and could be either provided a static alt or aria-hidden. As I don't see any that depend on user-provided content.

@mirorauhala
Copy link

Chiming in to say that images that are purely decorational should have an empty alt tag for assistive technologies. For example in repository Settings > Webhooks, there's a dropdown for adding new webhooks that lists 3rd party services with their logos. The logos in this case seem purely decorational since the service's name is right next to it. It's similar to the W3C's example 2.

@lunny lunny removed the type/bug label Jul 27, 2023
@delvh delvh added topic/ui-interaction Change the process how users use Gitea instead of the visual appearance and removed topic/ui Change the appearance of the Gitea UI kind/usability labels Oct 8, 2023
@wxiaoguang
Copy link
Contributor

-> Fix various frontend trivial problems #34263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/ui-interaction Change the process how users use Gitea instead of the visual appearance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants