Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

img longdesc attribute value should have hash '#' prefix where linking to description on page. #1119

Closed
JohnLukeBentley opened this issue Dec 20, 2017 · 4 comments · Fixed by #1120

Comments

@JohnLukeBentley
Copy link

From https://www.w3.org/TR/html52/semantics-embedded-content.html#graphical-representations-charts-diagrams-graphs-maps-illustrations, example 28 we have ...

<p id="graph7">According to a recent study Firefox has a 40% browser share,
  Internet Explorer has 25%, Chrome has 25%, Safari has 6% and Opera has 4%.</p>
<p><img src="piechart.gif" alt="The browser shares as a pie chart."
  longdesc="graph7"></p>  

longdesc="graph7" should be longdesc="#graph7". That is, the attribute value should be prefixed with a hash # ... unless I'm misunderstanding linking requirements.

From https://www.w3.org/TR/html-longdesc/, in the introduction we have an (informative) example ...

<!-- The description is somewhere on the same page as the image -->
<img src="http://example.com/graph1" alt="Drinks are getting sweeter"
    longdesc="#graph1Explained">

... which includes the hash. And Example 28, from https://www.w3.org/TR/html52/, is a case where "The description is somewhere on the same page as the image".

On https://www.w3.org/TR/html52/ there's another examples where the longdesc value doesn't include a hash, when it should. I.e. Example 30. There maybe more such examples.

@chaals
Copy link
Collaborator

chaals commented Dec 20, 2017

@JohnLukeBentley well spotted - thank you.

(In general a hash is not necessary, but this exasmple clearly refers to the content on the same page and does need it).

@JohnLukeBentley
Copy link
Author

@chaals thanks for the feedback and fix. We'll want to fix this also for Example 30 too it would seem. https://www.w3.org/TR/html52/semantics-embedded-content.html#graphical-representations-charts-diagrams-graphs-maps-illustrations

@chaals
Copy link
Collaborator

chaals commented Dec 22, 2017

Done - thank you again

@JohnLukeBentley
Copy link
Author

Thanking you again! :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants