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

longdesc not working? #668

Closed
jstallent opened this issue Jan 11, 2016 · 10 comments

Comments

@jstallent
Copy link

commented Jan 11, 2016

I am working on an EPUB 3 file for BISG, and tried to use the longdesc property to describe an image. However, I'm getting the following error:

ERROR(RSC-005): ....EPUB/1-cover.xhtml(19,127): Error while parsing file 'attribute "longdesc" not allowed here; expected attribute "about", "accesskey", "aria-activedescendant", "aria-atomic", .....

The code in question is:

<section id="cover" epub:type="cover" role="main">
    <img id="coverimage" src="cover.jpg" alt="Cover page: Quick Start Guide to Accessible Publishing" longdesc="#coverlongdesc"/>
    <div id="coverlongdesc" class="hidden">January 2016. Compiled by the BISG Content Structure Committee&rsquo;s Accessible Publishing Working Group. Featuring: Creating accessible content, How accessibility adds value, Building teams &amp; processes, Legal requirements, Glossary, and more…</div>
</section>

I was under the impression that longdesc was supported in EPUB 3 documents. Am I wrong? Or am I doing something incorrectly?

@danielweck

This comment has been minimized.

Copy link
Collaborator

commented Jan 11, 2016

I'm interested to hear more about the current status of longdesc in EPUB-Check as well. Spec.: https://www.w3.org/TR/html-longdesc/

That being said, your example naturally lends itself to aria-describedby, doesn't it? Spec.: https://www.w3.org/TR/wai-aria/states_and_properties#aria-describedby

@mattgarrish

This comment has been minimized.

Copy link
Member

commented Jan 11, 2016

No, it's not supported as it's not in the core html 5.0 spec. It was resurrected as an extension, but for extension to be allowed they have to be listed in the extensions section of the content documents spec.

In code you posted, you could just switch longdesc for aria-describedby (and lose the hash, as describedby is a list if IDs.)

@mattgarrish

This comment has been minimized.

Copy link
Member

commented Jan 11, 2016

I opened an issue a while back for 3.1 to be clearer about extensions:
w3c/publ-epub-revision#605

But it hasn't hit the radar yet.

@jstallent

This comment has been minimized.

Copy link
Author

commented Jan 11, 2016

Thanks, @mattgarrish. I was thinking that was the case.

@danielweck: The reason for using longdesc was just as an example (we expect people to rip open the EPUB and look at the code for examples of proper accessibility markup). I have aria-describedby in other places in the document, so I'll switch this one to that as well.

Thanks!

@tofi86

This comment has been minimized.

Copy link
Collaborator

commented Jan 2, 2017

The spec has been changed in the meantime. Needs to be reviewed again.

@mattgarrish

This comment has been minimized.

Copy link
Member

commented Jan 2, 2017

Longdesc is still out. It was erroneously listed as an allowed attribute on the img element earlier on the HTML 5.1 revision, but was subsequently removed to avoid confusion that it remains an extension.

It is still not an allowed extension in EPUB 3.1. The following clarifying note was added to address extensions:

Note
Although [HTML] allows user agents to support vendor-neutral extensions, unless such extensions are listed in this section they are not supported features of EPUB 3.1.

@tofi86

This comment has been minimized.

Copy link
Collaborator

commented Jan 2, 2017

Thanks for clarifying, Matt!

@StommePoes

This comment has been minimized.

Copy link

commented Jun 22, 2017

So, we're currently using hyperlinks to link to the long descriptions when the long descriptions themselves have structure, since aria-describedby expects to point to text (ie, pointing to a table as the long description of a chart or a graph is a total fail).
I take it we should continue using hyperlinks for our ePub3 long descriptions then?

@mattgarrish

This comment has been minimized.

Copy link
Member

commented Jun 22, 2017

At this time there isn't a way to provide structured access to a description beyond a mechanism like a hyperlink. The aria-details attribute is intended to address this problem, but it won't be available until ARIA 1.1 and HTML 5.2 become recommendations (5.2 makes its use in EPUB valid).

@mattgarrish

This comment has been minimized.

Copy link
Member

commented Nov 13, 2018

3.2 added a paragraph that only extensions listed in the extension section are valid in content documents, so that pretty well shuts the door on longdesc. I'm closing this issue as longdesc was not well received during the 3.0.1 revision, so is unlikely to ever get added. aria-details is closer to reality now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.