Skip to content

Commit

Permalink
[Dialog] Use FluentTooltip for close button (a11y)
Browse files Browse the repository at this point in the history
  • Loading branch information
vnbaaij committed May 21, 2024
1 parent 1d79491 commit d16b7d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Core/Components/Dialog/FluentDialog.razor
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
aria-describedby=@(_parameters.AriaDescribedby ?? AriaDescribedby)
aria-labelledby=@(_parameters.AriaLabelledby ?? AriaLabelledby)
aria-label=@(_parameters.AriaLabel ?? AriaLabel)
@attributes=@AdditionalAttributes>
@attributes=@AdditionalAttributes
tabindex="-1">

@* Default Header *@
@if (HasDefaultDialogHeader)
Expand Down
1 change: 1 addition & 0 deletions src/Core/Components/Dialog/FluentDialogHeader.razor
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<FluentButton Id="dialog_close" Appearance="Appearance.Stealth" OnClick="@(() => Dialog.CancelAsync())" aria-label="@Dialog.Instance?.Parameters?.DismissTitle">
<FluentIcon Value="@(new CoreIcons.Regular.Size24.Dismiss())" Width="16px" />
</FluentButton>
<FluentTooltip Anchor="dialog_close" Placement="Placement.Bottom">@Dialog.Instance?.Parameters?.DismissTitle</FluentTooltip>
}
</FluentStack>
}

0 comments on commit d16b7d9

Please sign in to comment.