Skip to content

Commit

Permalink
Merge pull request #631 from Automattic/fix/stories-alt-tags
Browse files Browse the repository at this point in the history
Added helper method to get `alt` text composed of all added text views on a given frame
  • Loading branch information
aforcier authored Jan 19, 2021
2 parents f1db27b + 6fa6376 commit b3a658d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,10 @@ data class StoryFrameItem(
}
)
}

@JvmStatic
fun getAltTextFromFrameAddedViews(frame: StoryFrameItem): String {
return frame.addedViews.joinToString(separator = " ") { it.viewInfo.addedViewTextInfo.text }
}
}
}

0 comments on commit b3a658d

Please sign in to comment.