-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
To fix help button keyboard navigable by tab and enter #10858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
To fix help button keyboard navigable by tab and enter #10858
Conversation
Yay, your first pull request towards Jenkins core was created successfully! Thank you so much! |
I wasn't able to add the following labels: web-ui -- Check that the label exists and is spelt right then try again. |
I believe the help-links should be buttons rather than links, seeing as they manipulate the current page rather than navigate away from it. |
You're absolutely right about the semantic concern. Help elements should be buttons since they perform actions rather than navigate. However, this PR focuses on the immediate keyboard accessibility fix. Converting to proper button elements would affect HTML templates should I need to update or create a separate PR as it focused on the keyboard navigation fix? |
}, | ||
); | ||
|
||
// legacy class name | ||
Behaviour.specify("A.help-button", "a-help-button", ++p, function (e) { | ||
e.onclick = helpButtonOnClick; | ||
e.tabIndex = 9999; // make help link unnavigable from keyboard | ||
// Allow keyboard navigation - help buttons shoulld be accessible | ||
e.addEventListerner('keydown', function(event){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
click
handler already provides keyboard handling, using Enter
for links and Space
for buttons, as long as you don't override the tabIndex
of the element. Maybe these custom handlers are not needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even with the tab index verything is working for me - but perhaps the issue is they you didn't tab enough? (the index for help is after all the actual fields which is probably not expected/desired)
this already works for me. Chrome, windows. tab to the help for something in http://localhost:8080/jenkins/job/sfdsdf/configure then press enter when it is highlighted. Now the tab order is such that you go through all of the components and then go through all of the help icons (which is not expected). But this is not what this change purports to be. Dashboard.-.Jenkins.-.Google.Chrome.2025-08-11.21-22-08.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is already working for me - unclear what the problem experienced is.
Description
This pull request improves the accessibility of help buttons in the Jenkins web UI.
Previously, help buttons (
.help-button
and.jenkins-help-button
) were only operable via mouse clicks, making them inaccessible to keyboard users. This change ensures that help buttons can also be activated using the Enter and Space keys, aligning with accessibility best practices.Technical Details
keydown
event listeners were added to detect Enter and Space key presses.Testing Done
Manual testing was performed on a local Jenkins instance. The following behaviors were verified:
(Screenshots or recordings can be added if necessary.)
Proposed Changelog Entries
Proposed Changelog Category
/label bug, web-ui
Proposed Upgrade Guidelines
N/A
Submitter Checklist
eval
, in compliance with CSP policies.@since
or@Restricted
, if applicable.Desired Reviewers
@jenkinsci/sig-ux
Maintainer Checklist
upgrade-guide-needed
label is used if applicable, and upgrade section is filled.lts-candidate
.