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
ImageResource2x.getSafeHtml caches the first alt text, so image button columns repeat one row's alt text #19332
RStudio Edition : Desktop or Server
RStudio Version : all current releases
OS Version : any
R Version : any
Describe the problem in detail
ImageResource2x.getSafeHtml(String altText) builds its <img> markup once and caches it in html_, ignoring the altText of every later call (src/gwt/src/org/rstudio/core/client/resources/ImageResource2x.java, getSafeHtml).
ImageButtonColumn holds a single ImageResource2x per column and calls getSafeHtml(titleProvider_.get(value)) for each row (src/gwt/src/org/rstudio/core/client/cellview/ImageButtonColumn.java, ImageButtonCell.render). So every row's image gets the alt text of the first row rendered. The surrounding <span title> is per-row and correct; only the image's alt text is stale.
Affected columns with per-row titles, in the Packages pane:
the Help column, whose title is the package's URL
the Browse column, whose title is derived from the package's source and browse URL
The Remove column and the Connections pane's Explore column pass a constant title, so they are unaffected.
Expected
Each row's image carries that row's alt text, or the image is marked decorative if the per-row name is carried elsewhere.
Notes on fixing
Either key the cache on altText (or only cache the no-argument form), or have ImageButtonCell build its own <img>.
Activity
Give each image button row its own alt text (#19472)