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

Simplify the exemption test #640

Open
mattgarrish opened this issue Feb 3, 2025 · 3 comments
Open

Simplify the exemption test #640

mattgarrish opened this issue Feb 3, 2025 · 3 comments
Labels
a11y-display-techniques-epub Issue with the epub accessibility metadata display techniques

Comments

@mattgarrish
Copy link
Member

mattgarrish commented Feb 3, 2025

Since we've opted to output a generic statement regardless of the exemption, there's no need to check for all three EAA exemptions separately. The test could be reduced to one variable that just checks if the exemption property is set.

LET exemption be the result of calling check for node on package_document, /package/metadata/meta[@property="a11y:exemption"].

and

IF exemption:
THEN display "Claims an accessibility exemption in some jurisdictions"

Then we wouldn't have to modify the algorithm every time a new exemption comes along.

(I expect this only works for the epub technique, though.)

@mattgarrish mattgarrish added the a11y-display-techniques-epub Issue with the epub accessibility metadata display techniques label Feb 3, 2025
@mattgarrish
Copy link
Member Author

mattgarrish commented Feb 3, 2025

Although for the onix test, it could still be one variable that checks for any of the three values:

LET exemption be the result of calling check for node on onix, /onix:ONIXMessage/onix:Product/onix:DescriptiveDetail/onix:ProductFormFeature[onix:ProductFormFeatureType = "09" and onix:ProductFormFeatureValue = ("75", "76", "77")]

@gregoriopellegrino
Copy link
Collaborator

Although for the onix test, it could still be one variable that checks for any of the three values:

LET exemption be the result of calling check for node on onix, /onix:ONIXMessage/onix:Product/onix:DescriptiveDetail/onix:ProductFormFeature[onix:ProductFormFeatureType = "09" and onix:ProductFormFeatureValue = ("75", "76", "77")]

Is this XPATH 1.0?

@mattgarrish
Copy link
Member Author

No, for 1.0 I'll probably have to do something like contains(" 75 76 77 ", onixProductFormFeatureValue).

But that's far less readable so I'd use 2.0 syntax for the techniques.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y-display-techniques-epub Issue with the epub accessibility metadata display techniques
Projects
None yet
Development

No branches or pull requests

2 participants