Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix accessibility: make copy-to-clipboard icons "keyboard-operable" in HTML displays#34429

Open
DeaMariaLeon wants to merge 9 commits into
scikit-learn:mainfrom
DeaMariaLeon:accessi-html
Open

Fix accessibility: make copy-to-clipboard icons "keyboard-operable" in HTML displays#34429
DeaMariaLeon wants to merge 9 commits into
scikit-learn:mainfrom
DeaMariaLeon:accessi-html

Conversation

@DeaMariaLeon

@DeaMariaLeon DeaMariaLeon commented Jul 3, 2026

Copy link
Copy Markdown
Member

Reference Issues/PRs

Towards #34366

Screenshot 2026-07-03 at 15 09 24

What does this implement/fix? Explain your changes.

This PR fixes accessibility issue "Device dependent event handler" found using WAVE.

These warnings show up with "mouse-only" handlers placed on elements that lack links or controls -- because they can't be reached with a keyboard.
For more information: Operable user interface and navigation

The copy-to-clipboard icon in the HTML displays can only be activated with a mouse.
(There are many other elements in the displays that are reached only with hover.)

Changed the <i> to <button> since buttons are "keyboard-operable" by default.
Also added aria-label - to add an accessible name to the button.

From the mdn docs:
An accessible name is the name of a user interface element; it is the text associated with an HTML element that provides users of assistive technology with a label for the element.

First time contributor introduction

AI usage disclosure

I used AI assistance for:

  • Research and understanding

Any other comments?

Not ready for review

This PR seems to fix the issues I mentioned above:

Screenshot 2026-07-03 at 17 14 53

@DeaMariaLeon DeaMariaLeon moved this to In progress in Labs Jul 3, 2026
@DeaMariaLeon DeaMariaLeon added this to Labs Jul 3, 2026
@DeaMariaLeon DeaMariaLeon marked this pull request as ready for review July 6, 2026 15:00
@DeaMariaLeon

DeaMariaLeon commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

To reviewers:
One should check that the copy-to-clipboard buttons in the parameters' table are "focusable" and can be keyboard activated. Users must be shown where they are in the table -- for accessibility as well.

Link to built example

WAVE report with the 207 alerts cleared

Goal of this PR:
- SimpleImputer

FYI @ogrisel @StefanieSenger

@DeaMariaLeon DeaMariaLeon moved this from In progress to PR waiting for reviews in Labs Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant