fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

TooltipHost does not set role=tooltip

Open lupine86 opened this issue 9 years ago • 1 comments

Bug Report

  • Package version(s):
  • Browser and OS versions: Edge Windows 10

Priorities and help requested (not applicable if asking question):

Are you willing to submit a PR to fix? Yes

Requested priority: Low

Products/sites affected: TFS

Describe the issue:

I had an accessibility issue reported to me regarding TooltipHost. When using Narrator + IE combo and navigating to a TooltipHost the tooltip is not read aloud and Narrator says "Group". I was able to work around this by:

  • setting an Id for the TooltipHost
  • setting the role of the child element to tooltip
  • setting the aria-describedby of the child element to tooltip
<TooltipHost
    id={this._squashMergeCheckboxTooltipId}
    content={this.state.squashPolicySetting.reason}
    directionalHint={DirectionalHint.bottomCenter}
    hostClassName="vc-dialog-info-icon">
        <span
               tabIndex={0}
               role={"tooltip"}
               aria-describedby={this._squashMergeCheckboxTooltipId}
               className="bowtie-icon bowtie-status-info-outline" />
</TooltipHost>

Actual behavior:

Narrator says "Group"

Expected behavior:

Narrator should say "Tooltip" and then after a pause say the contents of the tooltip.

If applicable, please provide a codepen repro:

lupine86 avatar Sep 14 '17 22:09 lupine86

I was mistaken. The role is set. For this particular issue I really just needed to set the role of the span to "note" and add an aria-label.

lupine86 avatar Sep 15 '17 15:09 lupine86