Skip to content

fix: AdditionalAttributes not propagated when using TooltipService #3689

@dmitrifaleev

Description

@dmitrifaleev

🐛 Bug Report

FluentTooltip AdditionalAttributes is not set when using TooltipService

💻 Repro or Code Sample

using default demo tooltip

<FluentIcon Id="myFirstButton" Icon="Icons.Regular.Size24.Notepad" />

<FluentTooltip Anchor="myFirstButton" OnDismissed="OnDismiss" AdditionalAttributes="_additionalAttributes">
    Hello World <br />
    It is a <i>small</i> tootip.
</FluentTooltip>

@code {
    private IReadOnlyDictionary<string, object>? _additionalAttributes = new Dictionary<string, object>
    {
        { "aria-label", "tooltip label" }
    }.AsReadOnly();

    private void OnDismiss()
    {
        DemoLogger.WriteLine("Tooltip dismissed!");
    }
}

🤔 Expected Behavior

Additional attributes are added to the element

😯 Current Behavior

Additional attributes are ignored

💁 Possible Solution

Map AdditionalAttributes in TooltipOptions, FluentTooltipProvider, FluentTooltip

🔦 Context

Need additional attributes to mitigate aria-tooltip-name accessibilty rule

🌍 Your Environment

Version: 4.11.9+66f010ac - Powered by .NET 8.0.15

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions