[FEAT] Add alt
and title
attributes for repository avatar images #251
Labels
No Label
backport/v1.19
backport/v1.20
backport/v1.21
bug
dependency
Chi
dependency
Chroma
dependency
citation.js
dependency
devcontainers
dependency
dropzone
dependency
F3
dependency
ForgeFed
dependency
garage
dependency
Gitea
dependency
Go-org
dependency
Golang
dependency
goldmark
dependency
Goth
dependency
Helm
dependency
MariaDB
dependency
Mermaid
dependency
minio-go
dependency
Monaco
dependency
PDFobject
dependency
Runner
dependency
ssh
dependency
urfave
dependency
Woodpecker CI
dependency
XORM
Discussion
duplicate
enhancement/feature
forgejo/accessibility
forgejo/actions
forgejo/branding
forgejo/ci
forgejo/documentation
forgejo/federation
forgejo/furnace cleanup
forgejo/internationalization
forgejo/moderation
forgejo/privacy
forgejo/release
forgejo/scaling
forgejo/security
forgejo/ui
issue
closed
issue
do-not-exist-yet
issue
open
OS
FreeBSD
OS
Linux
OS
MacOS
OS
Windows
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: forgejo/forgejo#251
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Feature Description
Provide a way to set
alt
andtitle
attributes associated to the avatar image of a project, and use them.The
alt
attribute would help with accessibility. It might be a single-line text input with placeholder Alternative text for screen readers.... When not set explicitly, thealt
attribute would be included but left empty (otherwise, from the ongoing spec for HTML: In a conforming document, the absence of thealt
attribute indicates that the image is a key part of the content but that a textual replacement for the image was not available when the image was generated.).The
title
attribute would help providing additional information, e.g. to set attribution when we use some icon that requires it (think of a CC-BY icon found somewhere). It might be a single-line text input with placeholder Tooltip shown when hovering the mouse on the image.... When not set explicitly, thetitle
attribute would not be included in the tag.Screenshots
None available:
alt
/title
attribute.What is the need behind this proposition and which are the benefits?
When you say avatar image of a project are you refering to the repo avatar or to the org avatar? or both?
Sorry, I wrote too much in the issue itself, here are the benefits:
alt
attribute would help with accessibility.title
attribute would help providing additional information, e.g. to set attribution when we use some icon that requires it (think of a CC-BY icon found somewhere).Re repo avatar vs org avatar I'm referring to the repo avatar, because I can understand that putting a different
title
on org/user avatars might become misleading.I agree with the alt attribute, but would not encourage to use the title attribute.
Mobile users wouldn't have a way to access its content. The tooltip behaviour is not guaranteed by the spec.
Two thoughts:
The repo avatar is placed aside the repo name and provide the same name via its title attr, so its redundant from a screen reader point of view and would be better to remove it from aria tree because is just decorative (as any logo in general). An empty alt do that also, but avoids to show an alternative text in case the image couldn't be downloaded for sight people. In any case, the alternative text should be "repository logo".
Apart from redundance, both elements are inside a container dedicated to the title, so add more information at that level is counterproductive for a screen reader.
Because of above statements, I wouldn't implement this feature.
If anybody have strong arguments in favor of implement these features, please comment for considering.
[FEAT] Add `alt` and `title` attributes for avatar imagesto [FEAT] Add `alt` and `title` attributes for repository avatar images