Add possibility to generate links from tooltips #397
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #383
This PR adds a new option for tooltips
linkTooltipsIfAvailable
which, if true (default should befalse
) will render descriptions which contain just an URL not as tooltip but as directly clickable button which will open the link in a new window. If the the option is false, the old behaviour is preserved.I also added a test/dev-example to the docs demonstrating the behaviour.
In addition, I added a second commit which adds an aria-label to the tooltip buttons. Currently, the buttons have no label at all which makes screen readers read them as "unlabelled button 1234" with some ID. This is a second commit, if you don't like it or would want me to provide a second PR, I can do so.
If you like my accessibility commit, I will likely supply a couple of further accessibility fixes in the future.