mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
fix(tooltip): make screenreader description less verbose
Ref: b5f40d8fc
This commit is contained in:
parent
278d906509
commit
95ce87554b
1 changed files with 2 additions and 3 deletions
|
@ -186,6 +186,7 @@
|
||||||
<div
|
<div
|
||||||
bind:this="{refIcon}"
|
bind:this="{refIcon}"
|
||||||
{...buttonProps}
|
{...buttonProps}
|
||||||
|
aria-describedby="{tooltipId}"
|
||||||
on:click|preventDefault|stopPropagation="{openMenu}"
|
on:click|preventDefault|stopPropagation="{openMenu}"
|
||||||
on:focus="{openMenu}"
|
on:focus="{openMenu}"
|
||||||
on:blur="{onBlur}"
|
on:blur="{onBlur}"
|
||||||
|
@ -200,6 +201,7 @@
|
||||||
<div
|
<div
|
||||||
bind:this="{ref}"
|
bind:this="{ref}"
|
||||||
{...buttonProps}
|
{...buttonProps}
|
||||||
|
aria-describedby="{tooltipId}"
|
||||||
on:click|preventDefault|stopPropagation="{openMenu}"
|
on:click|preventDefault|stopPropagation="{openMenu}"
|
||||||
on:focus="{openMenu}"
|
on:focus="{openMenu}"
|
||||||
on:blur="{onBlur}"
|
on:blur="{onBlur}"
|
||||||
|
@ -211,7 +213,6 @@
|
||||||
{#if open}
|
{#if open}
|
||||||
<div
|
<div
|
||||||
bind:this="{refTooltip}"
|
bind:this="{refTooltip}"
|
||||||
role="tooltip"
|
|
||||||
id="{tooltipId}"
|
id="{tooltipId}"
|
||||||
data-floating-menu-direction="{direction}"
|
data-floating-menu-direction="{direction}"
|
||||||
class:bx--tooltip="{true}"
|
class:bx--tooltip="{true}"
|
||||||
|
@ -231,8 +232,6 @@
|
||||||
class:bx--tooltip__content="{true}"
|
class:bx--tooltip__content="{true}"
|
||||||
tabIndex="-1"
|
tabIndex="-1"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-describedby="{$$props['tooltipBodyId']}"
|
|
||||||
aria-labelledby="{triggerId}"
|
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue