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

Clarify link element is not for general metadata expressions #2044

Closed
mattgarrish opened this issue Mar 8, 2022 · 6 comments
Closed

Clarify link element is not for general metadata expressions #2044

mattgarrish opened this issue Mar 8, 2022 · 6 comments
Labels
Spec-EPUB3 The issue affects the core EPUB 3.3 Recommendation Status-Deferred The issue has been deferred to another revision Topic-PackageDoc The issue affects package documents

Comments

@mattgarrish
Copy link
Member

I just reported an issue about epubcheck's enforcing of the media-type attribute on link elements, but it made me consider that the method of identifying conformance in the EPUB Accessibility 1.0 specification actually violates the specification.

It only slips through the cracks because the identifier URLs are "external" to the container, so a media-type attribute isn't required.

I'm sure there are plenty of similar "linked metadata" statements you could make with link that would similarly violate the specification but would be undetectable by epubcheck.

The element is focused on linked resources in its requirements and explanations, but I wonder if we should also clearly note that it is not intended for these kinds of general expressions?

@mattgarrish mattgarrish added the Topic-PackageDoc The issue affects package documents label Mar 8, 2022
@iherman
Copy link
Member

iherman commented Mar 8, 2022

Can you clarify what is violated and how? I am a bit lost...

@mattgarrish
Copy link
Member Author

mattgarrish commented Mar 8, 2022

The link element is for linking resources, or so is its sole focus in its definition. The EPUB Accessibility conformance statement isn't a "resource", it's a conformance identifier URL (that also happens to have a document at its destination, in this case, but that's not required of any identifier URL).

Up until 3.1, when we made an exception for server that might return different types of resources, it was required to specify a media-type attribute for any linked resource.

Epubcheck wasn't checking this, so when we created the Accessibility specification no one noticed that we were violating the requirement by not having a media-type attribute on the conformance links, which are:

<link rel="dcterms:conformsTo" href="http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aa"/>

Foruntately, the change in 3.1 makes this valid as far as epubcheck can tell. But I would not consider this a linked resource. It's a metadata conformance statement in the form of a URL.

So what I'm asking is should we add a note clarifying not to use link with these kinds of URLs? Or should we make clear that external links may not always resolve to resources?

@iherman
Copy link
Member

iherman commented Mar 8, 2022

Thanks for the clarification, @mattgarrish.

So what I'm asking is should we add a note clarifying not to use link with these kinds of URLs? Or should we make clear that external links may not always resolve to resources?

you also said, although just as a side-note:

that also happens to have a document at its destination, in this case

my Semantic Web past 😉 is not shocked at all that a URL is used as some an identifier, mainly when that URL also resolves to something on the Web. Which is the case here. The HTML <link> element may be used that way for metadata. We can add a note making it clear that a link does not always resolve to resources, but I believe the A11y spec does not violates the spec.

@mattgarrish
Copy link
Member Author

We can add a note making it clear that a link does not always resolve to resources, but I believe the A11y spec does not violates the spec.

But the accessibility specification isn't a resource of the publication in any way. The URL is an identifier, but the wording of the link element says:

The metadata element MAY contain zero or more link elements, each of which identifies the location of a linked resource in its REQUIRED href attribute

If it said the link element identifies resources or makes metadata statements about the publication, I'd agree with you fully.

But everything about the link element is, quite honestly, geared at linked metadata records, with sort of a vague idea that you can associate other resources like author home pages.

I'm kind of worried about trying to rewrite the section at this stage, though. The new identifiers for the 1.1 Accessibility specification don't use link, so the problem is less pronounced now. And anyone using link to state other conformance identifiers won't get caught by epubcheck even when it's fixed, so we can quietly ignore the issue. I'm fine just deferring this and not getting into it this close to CR.

@iherman
Copy link
Member

iherman commented Mar 9, 2022

But the accessibility specification isn't a resource of the publication in any way. The URL is an identifier, but the wording of the link element says:

The metadata element MAY contain zero or more link elements, each of which identifies the location of a linked resource in its REQUIRED href attribute

The specification does not say that 'resource' must be a 'resource of the publication'. The term 'resource' is very general, at least in W3C land. After all, RDF = "Resource Description Framework" 😀

@iherman
Copy link
Member

iherman commented Mar 9, 2022

I'm kind of worried about trying to rewrite the section at this stage, though. [...] I'm fine just deferring this and not getting into it this close to CR.

+1 to that.

@mattgarrish mattgarrish added the Status-Deferred The issue has been deferred to another revision label Mar 21, 2022
@mattgarrish mattgarrish added the Spec-EPUB3 The issue affects the core EPUB 3.3 Recommendation label Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Spec-EPUB3 The issue affects the core EPUB 3.3 Recommendation Status-Deferred The issue has been deferred to another revision Topic-PackageDoc The issue affects package documents
Projects
None yet
Development

No branches or pull requests

2 participants