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 00:45:11 UTC
(superset) 01/01: fix(a11y): add aria-label to dashboard IconButton and unlabeled call sites
This is an automated email from the ASF dual-hosted git repository.
eschutho pushed a commit to branch fix/dashboard-icon-button-aria-label
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 4f0434ba1d71b8c860eb6c16cae40279a9e2f46c
Author: Elizabeth Thompson <es...@gmail.com>
AuthorDate: Sat Jun 27 00:44:35 2026 +0000
fix(a11y): add aria-label to dashboard IconButton and unlabeled call sites
Icon-only buttons (delete, row settings, column settings) had no
accessible name, making them invisible to screen readers despite being
keyboard-focusable via tabIndex=0. Wires the existing label prop through
as aria-label on the underlying div[role=button] and provides labels at
all three call sites that previously passed none.
WCAG 2.1 SC 4.1.2 (Name, Role, Value) — Level A.
Co-Authored-By: Claude Sonnet 4.6 <no...@anthropic.com>
---
superset-frontend/src/dashboard/components/DeleteComponentButton.tsx | 2 ++
superset-frontend/src/dashboard/components/IconButton.tsx | 1 +
.../src/dashboard/components/gridComponents/Column/Column.tsx | 1 +
superset-frontend/src/dashboard/components/gridComponents/Row/Row.tsx | 1 +
4 files changed, 5 insertions(+)
diff --git a/superset-frontend/src/dashboard/components/DeleteComponentButton.tsx b/superset-frontend/src/dashboard/components/DeleteComponentButton.tsx
index 58c2b91c870..d08b9c49153 100644
--- a/superset-frontend/src/dashboard/components/DeleteComponentButton.tsx
+++ b/superset-frontend/src/dashboard/components/DeleteComponentButton.tsx
@@ -18,6 +18,7 @@
*/
import { MouseEventHandler, FC } from 'react';
+import { t } from '@apache-superset/core/translation';
import { Icons } from '@superset-ui/core/components/Icons';
import type { IconType } from '@superset-ui/core/components/Icons/types';
import IconButton from './IconButton';
@@ -33,6 +34,7 @@ const DeleteComponentButton: FC<DeleteComponentButtonProps> = ({
}) => (
<IconButton
onClick={onDelete}
+ label={t('Delete component')}
icon={<Icons.DeleteOutlined iconSize={iconSize ?? 'l'} />}
/>
);
diff --git a/superset-frontend/src/dashboard/components/IconButton.tsx b/superset-frontend/src/dashboard/components/IconButton.tsx
index a70d7c3d217..2b1b30244c0 100644
--- a/superset-frontend/src/dashboard/components/IconButton.tsx
+++ b/superset-frontend/src/dashboard/components/IconButton.tsx
@@ -43,6 +43,7 @@ const IconButton = ({ icon, label, onClick }: IconButtonProps) => (
<StyledDiv
tabIndex={0}
role="button"
+ aria-label={label}
onClick={e => {
e.preventDefault();
onClick(e);
diff --git a/superset-frontend/src/dashboard/components/gridComponents/Column/Column.tsx b/superset-frontend/src/dashboard/components/gridComponents/Column/Column.tsx
index 72be4b59a67..c0341608028 100644
--- a/superset-frontend/src/dashboard/components/gridComponents/Column/Column.tsx
+++ b/superset-frontend/src/dashboard/components/gridComponents/Column/Column.tsx
@@ -247,6 +247,7 @@ const Column = (props: ColumnProps) => {
/>
<IconButton
onClick={() => handleChangeFocus(true)}
+ label={t('Column settings')}
icon={<Icons.SettingOutlined iconSize="m" />}
/>
</HoverMenu>
diff --git a/superset-frontend/src/dashboard/components/gridComponents/Row/Row.tsx b/superset-frontend/src/dashboard/components/gridComponents/Row/Row.tsx
index c5ec0c497f5..3370bc2d67b 100644
--- a/superset-frontend/src/dashboard/components/gridComponents/Row/Row.tsx
+++ b/superset-frontend/src/dashboard/components/gridComponents/Row/Row.tsx
@@ -293,6 +293,7 @@ const Row = memo((props: RowProps) => {
<DeleteComponentButton onDelete={handleDeleteComponent} />
<IconButton
onClick={() => handleChangeFocus(true)}
+ label={t('Row settings')}
icon={<Icons.SettingOutlined iconSize="l" />}
/>
</HoverMenu>