You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): keep OpenDocument image descriptions in alt text - #41383
The Files preview renders OpenDocument image descriptions as visible document text and leaves the image's alt empty. Open the OASIS accessibility guidelines ODT in Files to see “OASIS logo” appear between the image and the heading.
Change
The shared OpenDocument renderer reads a frame's SVG-compatible title and description and puts them in the image's escaped alt attribute. It excludes those metadata elements from the document text and preserves ordinary captions.
Scope
Small bug fix in the shared ODT and ODP preview renderer. The public ODT fixture reproduces the defect directly.
Verification
The regression test failed on upstream main with an empty alt and visible metadata. It passes with the fix and covers XML namespace aliases, escaped attribute text, and caption preservation.
vp test run apps/web/src/components/files/FilePreviewPanel.test.ts passed all 45 tests, and vp run check:changed origin/main passed.
In Chromium on Windows, I opened the same OASIS ODT in Files before and after the change. The embedded GIF and heading remained visible, the stray text disappeared, and the image's DOM alt became OASIS logo. The browser check used the ODT fixture.
Before
After
Implemented and verified with GPT-6.2-Sol in T3 Code through the Codex harness.
Reviewing files that changed from the base of the PR and between b78731d and 04bddb8.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
ODF previews now use frame title and description text as escaped, bounded image alt text. The preview suppresses these metadata nodes. A test checks the alt text and visible caption.
Changes: ODF image descriptions
Layer / File(s)
Summary
Frame metadata to image alt text apps/web/src/components/files/extendedDocumentPreview.ts, apps/web/src/components/files/FilePreviewPanel.test.ts
The renderer extracts nonempty title and description text from each frame and applies it to child images’ escaped, bounded alt attributes. It suppresses title and description nodes from rendered content. The test checks the combined alt text and visible caption.
This fixes OpenDocument image descriptions showing up as visible text in Files previews by moving them into image alt text. The change is small and localized to the preview renderer, and no concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(web): keep OpenDocument image descriptions in alt text" names the main change: the shared ODT/ODP renderer now moves SVG title and description of a draw:frame into the image alt attribu…
Description check
The description follows the template sections (Problem, Change, Scope, Verification). It states the bug and reproduction steps with a public ODT fixture. It explains the fix and why the metadata is ex…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "fix(web): keep OpenDocument image descriptions in alt text" names the main change: the shared ODT/ODP renderer now moves SVG title and description of a draw:frame into the image alt attribute and hides them from document text. It follows the conventional commit format the template asks for, and it is specific enough for a teammate scanning history.
Full details: Description check
Explanation
The description follows the template sections (Problem, Change, Scope, Verification). It states the bug and reproduction steps with a public ODT fixture. It explains the fix and why the metadata is excluded from document text. It bounds scope to a small bug fix and links no issue. It reports focused test results (regression test, 45-test file run, check:changed) and a Chromium before/after check with screenshots. The template's required issue link is missing, but the author gives a reason, and the author also cites the PR objectives' issue number only in the title. The description is mostly complete.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Opened the reported OASIS ODT from the Files panel in the real web app on both commits, using fresh isolated state, identical document bytes, Chromium at 1280×800, and light theme.
The scenario failed on base because the logo had alt=""; it passed on head with alt="OASIS logo" and no visible description prose.
ODP previews, combined frame title and description metadata, and preservation of ordinary captions were not separately exercised; the supplied reproduction covers an ODT frame with description metadata.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:S10-29 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Files preview renders OpenDocument image descriptions as visible document text and leaves the image's
altempty. Open the OASIS accessibility guidelines ODT in Files to see “OASIS logo” appear between the image and the heading.Change
The shared OpenDocument renderer reads a frame's SVG-compatible title and description and puts them in the image's escaped
altattribute. It excludes those metadata elements from the document text and preserves ordinary captions.Scope
Small bug fix in the shared ODT and ODP preview renderer. The public ODT fixture reproduces the defect directly.
Verification
mainwith an emptyaltand visible metadata. It passes with the fix and covers XML namespace aliases, escaped attribute text, and caption preservation.vp test run apps/web/src/components/files/FilePreviewPanel.test.tspassed all 45 tests, andvp run check:changed origin/mainpassed.altbecameOASIS logo. The browser check used the ODT fixture.Implemented and verified with GPT-6.2-Sol in T3 Code through the Codex harness.