-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fixes for A11y metadata #208
base: develop
Are you sure you want to change the base?
Conversation
for _, item := range items { | ||
if profile := a11yProfile(item.value); profile != "" { | ||
profiles = append(profiles, profile) | ||
for k, v := range item.children { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I read correctly that the refined metadata of the last conformsTo
declared will override all the other accessibility metadata? In which case we're loosing the other metadata (global or refined). Is this what we want @HadrienGardeur?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I'm following that one since conformsTo
should be an array of URIs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand the code correctly this will parse the a11y metadata that are refining each dc:conformsTo
tags. Although I didn't know that <dc:conformsTo>
could be refined, I thought only <meta>
with an ID could.
@chocolatkey Do you have an OPF example that this is supposed to parse?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the example that we were using: https://github.com/standardebooks/nathaniel-hawthorne_the-house-of-the-seven-gables/blob/master/src/epub/content.opf#L19
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha I see, in that case my initial question stands. We can have several conformances with different IDs and their own refinements.
<meta id="conformance-statement" property="dcterms:conformsTo">EPUB Accessibility 1.1 - WCAG 2.2 Level AA</meta>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then it's probably a limitation of our model because the certification
object isn't tied to a particular conformsTo
.
I'm hesitant to shake things up though, because it seems quite unlikely that you'd get certified multiple times (in most countries, there won't be a certification process at all).
a11y.Features = m.a11yFeatures() | ||
a11y.Hazards = m.a11yHazards() | ||
a11y.Exemptions = m.a11yExemptions() | ||
ct, refinedA11y := m.a11yConformsTo() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you be able to add test cases for this new logic with the refined metadata? https://github.com/readium/go-toolkit/blob/develop/pkg/parser/epub/metadata_test.go
refines
property) as OPFmeta
elements (Support for EPUB Accessibility 1.1 conformance values #194)As mentioned in #194 , long term we should think about adjusting the parsing logic for child
meta
elements (elements that refine another) in the OPF, since our logic might end up ignoring them