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/07/03 10:17:25 UTC
(superset) 02/02: fix(a11y): drop DraggableFilter change, fix test selector for aria-label
This is an automated email from the ASF dual-hosted git repository.
eschutho pushed a commit to branch fix/a11y-filter-icon-alt-prop
in repository https://gitbox.apache.org/repos/asf/superset.git
commit f0a4466a8dde0087a063c34a9a70898866ee5e7c
Author: Elizabeth Thompson <es...@gmail.com>
AuthorDate: Fri Jul 3 10:16:19 2026 +0000
fix(a11y): drop DraggableFilter change, fix test selector for aria-label
Self-review found: (1) Icons.Drag renders through BaseIcon's customIcons
branch, which spreads caller props onto the inner SVG, not the outer
span that carries role/aria-label — so overriding its aria-label has no
effect on the announced name. That's a separate, pre-existing BaseIcon.tsx
bug, out of scope here, so the DraggableFilter.tsx change is reverted.
(2) FilterConfigPane.test.tsx queried the DOM by the old `alt` attribute;
updated to query by `aria-label` to match the DeleteOutlined fixes, which
do work (antdEnhancedIcons branch spreads rest onto the labeled element).
---
.../components/nativeFilters/FiltersConfigModal/DraggableFilter.tsx | 2 +-
.../nativeFilters/FiltersConfigModal/FilterConfigPane.test.tsx | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DraggableFilter.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DraggableFilter.tsx
index ee51e1c6635..4cb66c2ed65 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DraggableFilter.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/DraggableFilter.tsx
@@ -96,7 +96,7 @@ export const DraggableFilter: FC<FilterTabTitleProps> = ({
<Container isDragging={isDragging} {...attributes} {...listeners}>
<DragIcon
isDragging={isDragging}
- aria-label={t('Move icon')}
+ alt={t('Move icon')}
viewBox="4 4 16 16"
/>
<div css={{ flex: 1 }}>{children}</div>
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterConfigPane.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterConfigPane.test.tsx
index 56f1d7b1892..921c2c242ac 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterConfigPane.test.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FilterConfigPane.test.tsx
@@ -82,7 +82,9 @@ test('drag and drop', () => {
test('remove filter', async () => {
defaultRender();
// First trash icon
- const removeFilterIcon = document.querySelector("[alt='Remove filter']")!;
+ const removeFilterIcon = document.querySelector(
+ "[aria-label='Remove filter']",
+ )!;
userEvent.click(removeFilterIcon);
expect(defaultProps.onRemove).toHaveBeenCalledWith('NATIVE_FILTER-1');
});