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

Display logic for EPUB accessibility summary #477

Open
jonaslil opened this issue Nov 17, 2024 · 1 comment
Open

Display logic for EPUB accessibility summary #477

jonaslil opened this issue Nov 17, 2024 · 1 comment
Labels
a11y-display-guide Issue with the UX Guide principles or techniques

Comments

@jonaslil
Copy link

In the EPUB Techniques, 4.8.3 Instructions, the following instruction determines the display of the accessibility summary:

  1. ELSE IF accessibility_summary is NOT empty:
    THEN display the content of accessibility_summary with language_accessibility_summary as language.

I see two problems here:

1. Skipped block due to ELSE IF

If the variable lang_attribute_accessibility_summary is not empty (i.e., the condition in step 2 is true), the algorithm skips over the entire block containing the ELSE IF. As a result, even if an accessibility summary is present, it won't be displayed.

Solution:
Change the ELSE IF in step 4 to a standalone IF, so the check for accessibility_summary is always performed regardless of the earlier conditions.

2. Misuse of accessibility_summary

The variable accessibility_summary is a Boolean that indicates whether an accessibility summary is present in the document. It does not contain the actual content of the summary. As written, the instruction attempts to display the Boolean value (true or false), which is not the intended behavior.

Solution:
Define a new variable that holds the text content of the accessibility summary. For example:

LET accessibility_summary_content be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilitySummary"]/text()

Then, step 4 should read:

IF accessibility_summary:
THEN display the content of accessibility_summary_content with language_accessibility_summary as language.
@clapierre
Copy link
Collaborator

You are correct, we will update the spec. Nice catch @jonaslil

@mattgarrish mattgarrish added the a11y-display-guide Issue with the UX Guide principles or techniques label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y-display-guide Issue with the UX Guide principles or techniques
Projects
None yet
Development

No branches or pull requests

3 participants