Skip to content

Fixes for A11y metadata#208

Merged
chocolatkey merged 7 commits intodevelopfrom
a11y-refines-fix
May 8, 2025
Merged

Fixes for A11y metadata#208
chocolatkey merged 7 commits intodevelopfrom
a11y-refines-fix

Conversation

@chocolatkey
Copy link
Copy Markdown
Member

@chocolatkey chocolatkey commented Mar 18, 2025

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

for _, item := range items {
if profile := a11yProfile(item.value); profile != "" {
profiles = append(profiles, profile)
for k, v := range item.children {
Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

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>

Copy link
Copy Markdown
Member

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).

@HadrienGardeur
Copy link
Copy Markdown
Member

@chocolatkey could we merge that one this week as well?

@chocolatkey
Copy link
Copy Markdown
Member Author

@chocolatkey could we merge that one this week as well?

Yes, I'll finish the tests soon

@chocolatkey chocolatkey requested a review from mickael-menu May 8, 2025 06:31
@chocolatkey chocolatkey merged commit b192f08 into develop May 8, 2025
4 checks passed
@chocolatkey chocolatkey deleted the a11y-refines-fix branch May 8, 2025 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants