eschutho opened a new pull request, #41503:
URL: https://github.com/apache/superset/pull/41503

   ## Summary
   
   `ActionButton` is used throughout Superset list views to render icon-only 
row actions (edit, delete, export, etc.). It renders a `<span role="button" 
tabIndex={0}>` containing only an icon, but never sets an accessible name on 
that element.
   
   ### WCAG rule violated
   
   **WCAG 2.1 SC 4.1.2 — Name, Role, Value (Level A)**
   
   > For all user interface components, the name and role can be 
programmatically determined.
   
   Without `aria-label`, screen readers attempt to derive an accessible name 
from the icon's SVG content, which typically produces an empty or meaningless 
string (e.g. the icon's internal path data). Users navigating by keyboard or 
assistive technology cannot determine what each action button does.
   
   ### What changed
   
   Single line in `ActionButton/index.tsx`:
   
   ```diff
    <span
      role="button"
      tabIndex={0}
   +  aria-label={label}
      ...
    >
      {icon}
    </span>
   ```
   
   The `label` prop is already required (`string`) in `ActionProps` and is used 
for `data-test`. This change propagates it to `aria-label`, fixing the 
accessible name for all `ActionButton` instances across the app (list view 
actions, explore controls, etc.).
   
   ### Behavior unchanged
   
   Visual rendering, click handling, and keyboard interaction are identical. 
Only the screen-reader-announced name changes (from empty/SVG-derived to the 
human-readable action label already defined by callers).
   
   ### Test plan
   
   1. Tab to any list view (Dashboards, Charts, Datasets, etc.) and navigate to 
an action button column.
   2. Activate a screen reader (e.g. VoiceOver on macOS, NVDA on Windows).
   3. Confirm the screen reader announces the action name (e.g. "Edit", 
"Delete", "Export") rather than empty or SVG-derived content.
   4. Confirm click and keyboard (Enter/Space) behavior is unchanged.
   
   ---
   
   *Automated accessibility fix — part of the [Automated Accessibility 
Fixes](https://app.shortcut.com/preset/epic/111841) initiative.*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to