You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2026/06/27 10:10:45 UTC

(superset) 01/01: fix(a11y): add aria-label to IconTooltip button from tooltip prop

This is an automated email from the ASF dual-hosted git repository.

eschutho pushed a commit to branch fix/a11y-icon-tooltip-aria-label
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 1a8621801c58683ae4505da6f73d9a763e44fd73
Author: Elizabeth Thompson <es...@gmail.com>
AuthorDate: Sat Jun 27 10:09:57 2026 +0000

    fix(a11y): add aria-label to IconTooltip button from tooltip prop
    
    WCAG 2.1 SC 4.1.2 — Level A.
    
    The IconTooltip component renders a link-style Button that typically
    contains only an icon child. The tooltip string (shown on hover/focus
    as a visual tooltip) was never propagated to the button as aria-label,
    so screen readers announced the auto-generated icon name ("eye",
    "edit", etc.) rather than the human-readable action label.
    
    Passing tooltip as aria-label gives all three call sites correct
    accessible names without any changes at the call sites.
---
 .../packages/superset-ui-core/src/components/IconTooltip/index.tsx       | 1 +
 1 file changed, 1 insertion(+)

diff --git a/superset-frontend/packages/superset-ui-core/src/components/IconTooltip/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/IconTooltip/index.tsx
index 1c33550363e..f0b53a03a37 100644
--- a/superset-frontend/packages/superset-ui-core/src/components/IconTooltip/index.tsx
+++ b/superset-frontend/packages/superset-ui-core/src/components/IconTooltip/index.tsx
@@ -45,6 +45,7 @@ export const IconTooltip = forwardRef<HTMLElement, IconTooltipProps>(
         }}
         buttonStyle="link"
         className={`IconTooltip ${className}`}
+        aria-label={tooltip ?? undefined}
       >
         {children}
       </Button>