Skip to content

Commit

Permalink
Use alt text for title as well
Browse files Browse the repository at this point in the history
  • Loading branch information
codemonkey85 committed Nov 14, 2024
1 parent 157159e commit 00a8873
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion TiredDoctorManhattan.Wasm/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
{
<img src="data:image/png;base64,@GetImageBase64"
class="generated-image"
alt="@($"Doctor Manhattan sitting on a rock on Mars saying: \"I am tired of {TextToRender}.\"")">
alt="@AltText"
title="@AltText">
}
else
{
Expand Down
3 changes: 2 additions & 1 deletion TiredDoctorManhattan.Wasm/Pages/Index.razor.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Diagnostics;
using System.Timers;

namespace TiredDoctorManhattan.Wasm.Pages;

Expand All @@ -12,6 +11,8 @@ public partial class Index

private static string PageTitle => "Tired Doctor Manhattan";

private string AltText => $"Doctor Manhattan sitting on a rock on Mars saying: \"I am tired of {TextToRender}.\"";

private byte[]? ImageBytes { get; set; }

private string? GetImageBase64 => ImageBytes is null
Expand Down

0 comments on commit 00a8873

Please sign in to comment.