Repository navigation
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Independently validated The inserted icon case from #2223 still reproduces on both revisions, consistent with this PR’s scope. The inserted Star and a separate freeform renamed Star both reopen as generic custom shapes without an origin marker. These are DeckCraft CLI observations. |
There was a problem hiding this comment.
AI-generated review (Claude Opus 5.5). Not a maintainer decision.
No blocking problems found (not certain).
Adds an explicit picture-fill check to the missing-alt-text rule, so ordinary shapes filled with an image are reported unless they are described or decorative.
- crates/engine/src/cmd/review.rs:263 ORs
Fill::Pictureintoneeds_alt, so a shape matching both kind and fill is still reported only once. - crates/engine/src/cmd/review.rs:264 keeps the existing
descr.trim().is_empty() && !decorativeexemptions unchanged for the new case. - The new test
accessibility_requires_alt_text_for_picture_fillscovers an undescribed fill, a plain shape, a described fill and a decorative fill, and checks that only id 100 is reported. - Worth confirming that picture-filled shapes nested inside groups are reached by the same check, if the traversal does not already descend into group children.
Claims checked:
- verified: The accessibility check now reports nondecorative picture-filled shapes without alternative text. (crates/engine/src/cmd/review.rs:263 adds
|| matches!(&sh.fill, Some(deckcraft_model::Fill::Picture(_)))to needs_alt; review.rs:264-265 pushes 'Missing alternative text' when needs_alt holds.) - verified: Shapes with alt text and shapes marked decorative keep their existing exceptions. (crates/engine/src/cmd/review.rs:264 keeps the condition
needs_alt && sh.descr.trim().is_empty() && !sh.decorative; the test at review.rs:830-831 builds described (102) and decorative (103) shapes and asserts that o… - verified: Covers explicit picture fills only; icon detection remains open. (crates/engine/src/cmd/review.rs:263 checks only
Fill::Picture; nothing in the diff adds icon detection.)
Reviewed at cbe1a62.
Recommendation: merge, after a maintainer's decision.
DeckCraft’s accessibility check now reports picture-filled shapes that need alternative text.
Part of #2223, covering explicit picture fills. Icon detection remains open.
The checker previously looked at shape kind, so it missed an ordinary shape filled with a picture. It now checks the fill as well. Shapes with alt text and shapes marked decorative keep their existing exceptions.
Verification
Added
accessibility_requires_alt_text_for_picture_fillsto exercisereview.accessibilitywith an undescribed picture fill, a plain shape, and the two exceptions. Local rustfmt passed for the changed file. The Rust test was not run locally.Summary by CodeRabbit