Repository navigation
PowerPoint: read the text of SmartArt graphics - #21014
Closed
ChristosBouronikos wants to merge 1 commit into
Closed
ChristosBouronikos wants to merge 1 commit into
ChristosBouronikos wants to merge 1 commit into
Conversation
A SmartArt graphic has no text frame, so its node text was neither read in slide shows nor available as the shape value in the editor. Read the text of its nodes.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Link to issue number:
Fixes #10770
Summary of the issue:
The text of a SmartArt graphic (for example the bubbles of a flow chart) is not available as the text frame of the shape: a SmartArt shape has no text frame, and its text is held by its nodes. NVDA only reads the text of shapes which have a text frame, or an alternative text. A SmartArt graphic without an alternative text was therefore skipped when reading a slide in a slide show, and had no value when moving to it with Tab in the editor.
Description of user facing changes:
NVDA reads the text of SmartArt graphics:
Description of developer facing changes:
None. A module level helper,
iterSmartArtNodeTexts, is added toappModules.powerpnt.Description of development approach:
iterSmartArtNodeTextsgoes throughshape.smartArt.allNodesin the order of the PowerPoint object model, and yields the text of the nodes which have some, with paragraph marks and soft line breaks turned into new lines. It is used bySlideShowWindow._getShapeTextandShape._get_value.Testing strategy:
tests/unit/test_appModules/test_powerpnt_smartArt.py. The tests cover node order, skipping empty nodes, line break normalization, reading in a slide show, the value in the editor, and a graphic without nodes. Without the change, they fail.Known issues with pull request:
Shape._get_valuemay need to be rebased on this one.Code Review Checklist: