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

img logo should have an empty alt - accessibility #2209

Closed
luce-carevic opened this issue Jan 5, 2019 · 8 comments
Closed

img logo should have an empty alt - accessibility #2209

luce-carevic opened this issue Jan 5, 2019 · 8 comments
Labels
Milestone

Comments

@luce-carevic
Copy link

header.phtml

<img class="logo" src="<?php echo _i('icon', true); ?>" alt="⊚" />

The alternative must be empty here.

@Alkarex
Copy link
Member

Alkarex commented Jan 5, 2019

Hello @Llune
Could you please explain the problem you are facing?

@luce-carevic
Copy link
Author

Hi,

The logo is a decorative image in this context.

The alt attribute will be read by a screenreader and it should not be in this context. Thus it should be empty alt="".

@Alkarex
Copy link
Member

Alkarex commented Jan 5, 2019

Yes, my question was more whether this is a theoretical issue, or whether there is an actual screenreader causing a problem with ⊚. What is the behaviour in your screenreader?

Having Unicode alternatives to images helps when images are not displayed, e.g. due to a preference, network problem, or when using a text browser.

Example without images:
image

Example in a terminal (the one I have there does not show all Unicode signs correctly, but that gives an idea):

image

@Alkarex Alkarex added the UI 🎨 User Interfaces label Jan 5, 2019
@Alkarex
Copy link
Member

Alkarex commented Jan 5, 2019

It seems to me that it is not a good idea to use empty alt attributes. Instead, it is probably better to declare things correctly; in this case, something like aria-hidden="true".
Comments welcome.

@luce-carevic
Copy link
Author

The Unicode symbol is read by VoiceOver (macOS) and by all the screenreaders actually.

You're using the alt attribute in a way it should not be used. It's primary function is to provide information when needed to blind and low sighted people not style the display in a text browser.

But I'm not going to argue on that since you can also just hide the img with aria-hidden="true".

@Alkarex Alkarex reopened this Jan 5, 2019
@Alkarex Alkarex added this to the 1.13.1 milestone Jan 5, 2019
@Alkarex
Copy link
Member

Alkarex commented Jan 5, 2019

Let's go for alt="" after all :-) Are you able to make a patch?

For the record, alt is for all the cases when the image is not displayed, not only for screenreaders - which are important but form only a subset of the usecases. C.f. https://www.w3.org/TR/html52/semantics-embedded-content.html#examples-of-scenarios-where-users-benefit-from-text-alternatives-for-images

To quote the HTML5 specification:

alt - Replacement text for use when images are not available

But in this specific case, the argument is that the image is not important because the text FreshRSS is just next to it and therefore a alt="" is OK. Cf. https://www.w3.org/TR/html52/semantics-embedded-content.html#example-31258c87

If a logo is being used next to the name of the what that it represents, then the logo is supplemental. Include an empty alt attribute as the text alternative is already provided.

Since the layout does not change much with or without the logo, alt="" does not seem to arm the other usecases.

@Alkarex
Copy link
Member

Alkarex commented Jan 5, 2019

Alkarex added a commit to Alkarex/FreshRSS that referenced this issue Jan 17, 2019
@Alkarex
Copy link
Member

Alkarex commented Jan 17, 2019

Fixed in #2219

@Alkarex Alkarex closed this as completed Jan 17, 2019
Alkarex added a commit that referenced this issue Jan 17, 2019
javerous pushed a commit to javerous/FreshRSS that referenced this issue Jan 20, 2020
mdemoss pushed a commit to mdemoss/FreshRSS that referenced this issue Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants