Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for img tag helper not outputting alt attribute when specified #59

Merged
merged 4 commits into from
May 5, 2023

Conversation

richarth
Copy link
Contributor

@richarth richarth commented May 3, 2023

When you use the img tag helper as follows no alt attribute is output:

<our-img src="/images/logo.png" alt="Img alt" />

At the moment an alt attribute is only output if a value isn't specified, which triggers the auto generation of the alt attribute value. This PR handles the case when an alt attribute is specified and adds that value to the output.

Copy link
Member

@warrenbuckley warrenbuckley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @richarth for the change, this looks good to me.
Done a tiny bit of tidying up, but this will be merged in once CI is happy

@warrenbuckley warrenbuckley merged commit b0fa53c into umbraco-community:main May 5, 2023
@warrenbuckley warrenbuckley added the bug Something isn't working label May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants