Skip to content

fix: Title becomes the accessible name in FluentButton #5590

Closed

Description

@p6laris

🐛 Bug Report

If a FluentButton has both text and a Title, the Title ends up as the aria-label, so the accessible name no longer contains the visible text. FluentAnchorButton, FluentCompoundButton, FluentMenuButton, FluentSplitButton and FluentToggleButton do the same.

💻 Repro or Code Sample

<FluentButton Title="Write a query first.">Run</FluentButton>

🤔 Expected Behavior

The accessible name stays "Run" and Title stays a tooltip.

😯 Current Behavior

It renders this on 5.0.0 and 5.0.1:

<fluent-button role="button" aria-label="Write a query first." title="Write a query first." ...>Run</fluent-button>

That fails WCAG 2.5.3 (Label in Name). Someone using voice control who says "click Run" won't hit the button, and a screen reader reads the tooltip instead of "Run".

💁 Possible Solution

It comes from aria-label="@Title" in FluentButton.razor. Maybe only set it when there's no Label or ChildContent, the same check icon-only already uses. Icon-only buttons would keep their name, and the FluentButton_Title snapshot would change. I'm happy to send a PR if that sounds right to you. Until then, passing aria-label explicitly works around it.

🔦 Context

I was adding explanatory tooltips to disabled buttons and noticed the button name changed to the tooltip text.

🌍 Your Environment

  • OS & Device: Windows 11 on PC
  • Browser: not relevant, the attributes come from the server render (checked with bUnit)
  • .NET and Fluent UI Blazor library Version: .NET 10.0.401 and Microsoft.FluentUI.AspNetCore.Components 5.0.0 and 5.0.1

Activity

  1. vnbaaij commented on Nov 4, 2026

    @vnbaaij
    Collaborator

    Yes, please create a PR to fix this.

  2. added
    community:contribution
    a11y
    on Nov 4, 2026
  3. p6laris commented on Nov 4, 2026

    @p6laris
    ContributorAuthor

    Thanks, I'm on it. I'll open the PR shortly.

  4. added
    FluentUIBlazor_Web
    and removed
    FluentUIBlazor_Web
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a11ycommunity:contribution

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions