[JS] Only assign img alt text if it's supplied#4010
Conversation
|
Hi @paulcam206. Thanks for helping make the AdaptiveCards JS renderer + tooling better. As additional verification, once the JS build succeeds, please go to the test site to test out your website/designer changes. |
|
/azp run |
|
No pipelines are associated with this pull request. |
shalinijoshi19
left a comment
There was a problem hiding this comment.
Something we should consider backporting to release/1.2 and potentially prep for an AdaptiveCards v1.2.9 patch.. Thoughts?
| test('Image should be instantiated', ()=>{ | ||
| const image = new Image(); | ||
| expect(image).toEqual(expect.anything()); | ||
| expect(image.altText).toBeUndefined(); |
There was a problem hiding this comment.
I know you were working on more comprehensive UTs for the platform.. so potentially some coming up which actually test the altText flowing through if specified/not undefined?
Should be easy enough (though it'll likely be a manual port rather than a cherry-pick). |
|
/azp run |
|
No pipelines are associated with this pull request. |
Related Issue
Fixes #2235
Description
When a card author fails to supply alt text, we actually create an img element with the alt text set to
"undefined"rather than not set the property in the first place.How Verified
How you verified the fix, including one or all of the following:
Microsoft Reviewers: Open in CodeFlow