Repository navigation
FIX accessibility: make copy-to-clipboard icons "keyboard-operable" in HTML displays - #34429
Conversation
|
To reviewers: |
|
It doesn't work on Safari. None of the fixes that use button or tab will work on Safari. It's an old Safari's bug https://bugs.webkit.org/show_bug.cgi?id=22261 |
|
Please add changelog entries for this kind of accessibility fixes. |
There was a problem hiding this comment.
Thanks this looks good to me. I tried the rendered example in firefox and chrome and I confirm copy and paste is actionable from the keyboard.
One thing I observed on the example though: in firefox and chrome, when navigating via "tab", if the SimpleImputer blocked is collapsed, I can select the question mark icon, but not the SimpleImputer block itself nor its arrow to expand it.
I think we should make the array or the block itself expandable to make it possible to then select inner components such as the copypaste buttons.
I checked that the output features blocks can be selected via the tab key but not the estimator blocks.
Let's do that in a follow-up PR to keep things easy to review.
I was working on it as well - it's in the oven. |
|
Thank you |
|
De rien. In my own PRs, I also don’t want to wait forever for such small changes. |

Reference Issues/PRs
Towards #34366
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:
Any other comments?
Not ready for review
This PR seems to fix the issues I mentioned above: