Remove trivial tooltips from the help link#10949
Conversation
|
Very much agree with this - I wanted to do this myself. Thanks! |
| <j:when test="${attrs.url!=null}"> | ||
| <j:set var="altText" value="${attrs.featureName != null ? '%Help for feature:' + ' ' + attrs.featureName : '%Help'}" /> | ||
| <a href="#" class="jenkins-help-button" tooltip="${altText}" helpURL="${rootURL}${attrs.url}"> | ||
| <a href="#" class="jenkins-help-button" helpURL="${rootURL}${attrs.url}"> |
There was a problem hiding this comment.
It looks like this was originally the alt text of an img instead of a tooltip so screen readers would have read it out but it wouldn't have been visible directly to users.
Changed in uhafner@742c99e
Looks like mistakenly by me as some of the help icons had meaningful text which made sense to move there but this one didn't.
Currently this is what voiceover announces on master:
With this branch it just shows a ?
I think this should be set as an aria-label, (I've tested locally and it seems right):
| <a href="#" class="jenkins-help-button" helpURL="${rootURL}${attrs.url}"> | |
| <a href="#" class="jenkins-help-button" helpURL="${rootURL}${attrs.url}" aria-label="${altText}"> |
There was a problem hiding this comment.
That is even better. Then I can leave the variable in place and the only change is the tooltip vs. aria-label.
Before this change, the help link showed a trivial tooltip that simply repeated the name of the control. Such tooltips distract the user. Users might even not click the link anymore because they think that the tooltip already shows the actual help message. Now the additional help text is available as aria-label only.
ad8b7fb to
329affd
Compare
janfaracik
left a comment
There was a problem hiding this comment.
Thanks, tried and looks good to me.
|
/label ready-for-merge This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback. Thanks! |
Before this change, the help link showed a trivial tooltip that simply repeated the name of the control. Such tooltips distract the user. Users might even not click the link anymore because they think that the tooltip already shows the actual help message.
Testing done
Removed the test
Security2779Test#noXssInHelpLinkPanelas it is superfluous now.Proposed changelog entries
Proposed changelog category
/label skip-changelog
Proposed upgrade guidelines
N/A
Submitter checklist
@Restrictedor have@since TODOJavadocs, as appropriate.@Deprecated(since = "TODO")or@Deprecated(forRemoval = true, since = "TODO"), if applicable.evalto ease future introduction of Content Security Policy (CSP) directives (see documentation).Desired reviewers
@timja @janfaracik @jenkinsci/sig-ux
Before the changes are marked as
ready-for-merge:Maintainer checklist
upgrade-guide-neededlabel is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidateto be considered (see query).