Skip to content

Comics roles - #304

Merged
JayPanoz merged 9 commits into
developfrom
comics-roles
Nov 24, 2026
Merged

JayPanoz merged 9 commits into
developfrom
comics-roles

Conversation

@JayPanoz

@JayPanoz JayPanoz commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

This implements roles for comics e.g. panel, bubble, etc.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Caption handling still duplicates descriptions for nested formatted captions and can remove wrappers containing semantic credit content, causing photo credits to disappear entirely.

2 open issues
What changed in this PR

This PR adds comics semantics to guided-navigation conversion and updates how figures and tables named by their captions are represented.

Changes:

  • Maps EPUB comics types to bubble, panel, panelGroup, and sound, preserving content inside panels with role="img".
  • Deduplicates plain naming captions while retaining captions with formatted content.
  • Adds seven fixtures and updates coverage documentation and the changelog.
File Description
guided-navigation/​src/​roles.ts Adds comics role mappings and nesting rules.
guided-navigation/​src/​object.ts Reconciles naming captions with descriptions.
guided-navigation/​src/​converter.ts Tracks naming captions and preserves panel content.
guided-navigation/​fixtures/​table-caption-aria-labelledby/​meta.json Updates plain-caption expectations.
guided-navigation/​fixtures/​table-caption-aria-labelledby/​gnd.json Removes duplicate caption output.
guided-navigation/​fixtures/​table-caption-aria-labelledby-emphasis/​meta.json Describes emphasized-caption coverage.
guided-navigation/​fixtures/​table-caption-aria-labelledby-emphasis/​input.html Adds an emphasized table caption.
guided-navigation/​fixtures/​table-caption-aria-labelledby-emphasis/​gnd.json Expects formatted caption content.
guided-navigation/​fixtures/​sound-epub-type/​meta.json Describes sound-role coverage.
guided-navigation/​fixtures/​sound-epub-type/​input.xhtml Adds a sound-area example.
guided-navigation/​fixtures/​sound-epub-type/​gnd.json Expects the sound role.
guided-navigation/​fixtures/​ROLES_COVERAGE.md Updates role coverage and fixture totals.
guided-navigation/​fixtures/​panel-role-img-labelled/​meta.json Describes image-role panel coverage.
guided-navigation/​fixtures/​panel-role-img-labelled/​input.xhtml Adds a labelled panel with a bubble.
guided-navigation/​fixtures/​panel-role-img-labelled/​gnd.json Expects preserved panel children.
guided-navigation/​fixtures/​panel-group-epub-type/​meta.json Describes panel-group coverage.
guided-navigation/​fixtures/​panel-group-epub-type/​input.xhtml Adds grouped panels.
guided-navigation/​fixtures/​panel-group-epub-type/​gnd.json Expects nested panel structure.
guided-navigation/​fixtures/​panel-epub-type/​meta.json Describes region-panel coverage.
guided-navigation/​fixtures/​panel-epub-type/​input.xhtml Adds a panel with narration and dialogue.
guided-navigation/​fixtures/​panel-epub-type/​gnd.json Expects panel and bubble semantics.
guided-navigation/​fixtures/​manifest.json Registers fixtures and updates caption expectations.
guided-navigation/​fixtures/​figure-caption-aria-labelledby-language/​meta.json Describes multilingual-caption coverage.
guided-navigation/​fixtures/​figure-caption-aria-labelledby-language/​input.html Adds a caption language change.
guided-navigation/​fixtures/​figure-caption-aria-labelledby-language/​gnd.json Expects preserved language markup.
guided-navigation/​fixtures/​bubble-epub-type/​meta.json Describes bubble-role coverage.
guided-navigation/​fixtures/​bubble-epub-type/​input.xhtml Adds a balloon example.
guided-navigation/​fixtures/​bubble-epub-type/​gnd.json Expects the bubble role.
guided-navigation/​CHANGELOG.MD Documents comics support and breaking caption changes.

Review effort: Balanced

Comment thread guided-navigation/src/object.ts Resolved
Comment thread guided-navigation/src/object.ts Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Caption deduplication can repeat names for linked, formatted captions and discard per-passage language metadata from multilingual captions.

2 open issues
2 resolved since last review

Review effort: Balanced

Comment thread guided-navigation/src/object.ts Resolved
Comment thread guided-navigation/src/object.ts Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Caption processing can cause stack overflow through cyclic figure references and discard naming text when converted captions omit hidden content.

2 open issues
2 resolved since last review

Review effort: Balanced

Comment thread guided-navigation/src/converter.ts Resolved
Comment thread guided-navigation/src/converter.ts Resolved
Scope and impact of caption changes is too much to be merged into this PR.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Inline panel elements bypass image handling without being classified as blocks, causing their roles and labels to be discarded and the panels to disappear.

1 open issue
2 resolved since last review

Review effort: Balanced

Comment thread guided-navigation/src/converter.ts Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the comics guided-navigation changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@JayPanoz
JayPanoz added this pull request to the merge queue Nov 24, 2026
Merged via the queue into develop with commit 9eb8436 Nov 24, 2026
7 checks passed
@JayPanoz
JayPanoz deleted the comics-roles branch November 24, 2026 10:29
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.

2 participants