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

The images /images/sample-bdi.png and /images/sample-not-bdi.png has no alt attribute #750

Closed
izh1979 opened this issue Feb 27, 2016 · 9 comments
Labels
clarification Standard could be clearer good first issue Ideal for someone new to a WHATWG standard or software project

Comments

@izh1979
Copy link

izh1979 commented Feb 27, 2016

The images /images/sample-bdi.png and /images/sample-not-bdi.png has no alt attribute, which is mandatory if I understand correctly.

@Yay295
Copy link
Contributor

Yay295 commented Feb 27, 2016

Could you give a bit more information as to where these image links are?

@annevk
Copy link
Member

annevk commented Feb 28, 2016

Doesn't the specification allow you to rely on figcaption too?

@Yay295 simply search in source for the mentioned URLs.

@domenic
Copy link
Member

domenic commented Feb 28, 2016

I am pretty sure this is intentional, because the images just duplicate their captions, and so this falls under

Another corollary is that the alt attribute's value should not repeat information that is already provided in the prose next to the image.

and

4.8.4.1.6 A graphical representation of some of the surrounding text

I guess they should have alt="" though.

@domenic domenic added the clarification Standard could be clearer label Feb 28, 2016
@tabatkins
Copy link
Contributor

Yes, a missing alt is a conformance error. An empty alt indicates that the image needs no alt text because it's decorational (which includes "is just visually representing something already depicted in surrounding text).

@domenic domenic added the good first issue Ideal for someone new to a WHATWG standard or software project label Feb 29, 2016
@zcorpan zcorpan removed the good first issue Ideal for someone new to a WHATWG standard or software project label Mar 1, 2016
@zcorpan
Copy link
Member

zcorpan commented Mar 1, 2016

No... The spec allows omitting alt in some cases. Adding alt="" means that the image is not a key part of the content, but here it is.

https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element:attr-img-alt-8

@zcorpan
Copy link
Member

zcorpan commented Mar 1, 2016

Maybe we could replace this with text instead of using images, with <bdo dir=ltr> as is done in e.g. https://w3c.github.io/webvtt/#example-4a66a3ef ("What was his name again?" example and the "I’ve read the book" example).

@zcorpan
Copy link
Member

zcorpan commented Mar 1, 2016

The spec allows omitting alt if the document is intended for a specific person (N/A for the spec itself), and for "Images whose contents are not known" (we do know what they contain).

This probably falls under "Ancillary images" where, if there's a caption, alt must not be empty.

@zcorpan
Copy link
Member

zcorpan commented Mar 1, 2016

Looking at the example some more I guess it could fall under "A graphical representation of some of the surrounding text"...

@zcorpan
Copy link
Member

zcorpan commented Mar 1, 2016

OK so then adding alt="" seems correct.

@zcorpan zcorpan added the good first issue Ideal for someone new to a WHATWG standard or software project label Mar 1, 2016
@domenic domenic closed this as completed in 3d34920 Mar 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer good first issue Ideal for someone new to a WHATWG standard or software project
Development

No branches or pull requests

6 participants