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

Reduce variables and processing of epub conformance metadata #495

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mattgarrish
Copy link
Member

@mattgarrish mattgarrish commented Nov 26, 2024

This pull request implements the processing change I mentioned in #494 (comment)

In addition to what I mentioned there, I noticed a couple of other problems with the processing that I've tried to fix:

  • For one, there's no value in checking for a random conformsTo statement and then say the conformance can't be determined. It would result in an unknown claim for an epub/a publication, for example. I would stay away from making sense of things we don't know and leave it to future versions of the spec to handle any new conformance claims that need noting. I took out the variable and conformance statement related to this.
  • Also, the processing of the metadata should end if a known accessibility conformance statement isn't found (i.e., the first "ELSE" condition). If you don't stop there, you could end up showing certifier metadata related to an unknown claim and you'd always have an empty heading for the conformance statement that's not there. I added the condition "AND end processing of conformance statement" to the ELSE, but maybe there's other wording you'd want to use here.

We'd probably still need a note where I have the display statement for conformance_str. I don't know how you guys would want to handle that the variable could hold any of the nine statements. It probably requires a different set of strings than the ONIX processing uses, although the end result will be the same strings.

I'm also open to other ways to process the 1.1 strings into the two variables we need. Maybe we just drop the normalize-space call, as otherwise it'd look like any language's string replacement functionality.

Fixes #511
Fixes #512


Preview | Diff

@clapierre
Copy link
Collaborator

Ok, Reviewing the original code and the updated code, I se an issue which we didn't really address. In both cases we never did say what this EPUB has been checked against, only if it met the min, met the expected or exceeded.

We don't say if it met WCAG 2.0 2.1 or 2.2. Which is a problem since some folks will require WCAG 2.1 AA, where others might require WCAG 2.2 AA. We also don't point out if this EPUB passed EPUB 1.1 or 1.0. Not sure if that is as big a deal as the WCAG version or not.

@GeorgeKerscher @gregoriopellegrino what do you all think? Or do we need to discuss this at our next editors call?

@GeorgeKerscher
Copy link
Collaborator

We have this in:
Permalink for Section 4.3.2
The following information can be placed in a section that shows the details of the conformance information.
Conformance Statement
Identifies the accessibility specification and the conformance level to which the publication assertions are made. When the publication claims to conform to more than one specification, additional conformance statements may be provided.
Certification date
If the date of the certifier's evaluation is provided, then this would be of interest. This is normally associated with the certifier.
Certifier's Report
If a link to a report is provided, this may be of interest.

Perhaps we should use the word must or strongly advise.

@mattgarrish
Copy link
Member Author

we never did say what this EPUB has been checked against, only if it met the min, met the expected or exceeded. We don't say if it met WCAG 2.0 2.1 or 2.2.

What version and level it meets comes after those generic statements based on the level it passed. They come after the detailed conformance information heading is inserted; I have "display conformance_str" in the new code where it's inserted.

@mattgarrish
Copy link
Member Author

What we learned with publication manifest is that when making algorithms it's really helpful to write some public code to implement the instructions. That way anyone can run some samples through and see what results. I can maybe try and adapt the generator I made to implement the current logic.

@GeorgeKerscher
Copy link
Collaborator

Wow! That would be outstanding!

@mattgarrish
Copy link
Member Author

I made a few changes in the last commit based on implementing this code:

  • I renamed conformance_str to conformance_string to be consistent with naming elsewhere
  • I created a variable called conformance and use the language for the certifier info to extract the node rather than test that it is present. This makes it simpler to understand the replace functions that extract the statement and wcag level
  • I reorganized the instructions so that there isn't the need for that halting statement in the middle. If conformance_string is empty, then you can bail out right away. The processing now happens in the ELSE that follows.

I also added the missing quotes to the 1.0 xpaths and deleted the extra backet in the certifier xpath so this will also close #511 and #512

@mattgarrish
Copy link
Member Author

The one thing that make me unsure about merging this yet is the string that results from extracting the 1.1 conformance statement and using a regex to delete the hyphen from it.

The result is that we can't associate a single ID with it. It could be any of the nine strings. Should we list all of these with their IDs or put them in a note? It makes localization a little more complicated as you have to translate the English text to an ID before you can match the localization. It's not like the other instructions that end in an single ID value.

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.

Extra square bracket in certifier report xpath EPUB A11y 1.0 xpaths missing opening quote
4 participants