koumoul-dev / vuetify-jsonschema-form

Create beautiful and low-effort forms that output valid data. Published on npm as @koumoul/vjsf.
https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/
MIT License
538 stars 154 forks source link

Add possibility to generate links from tooltips #397

Open Martin-Idel opened 1 year ago

Martin-Idel commented 1 year ago

Closes #383

This PR adds a new option for tooltips linkTooltipsIfAvailable which, if true (default should be false) 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.

Martin-Idel commented 1 year ago

Any news here? Just wondering if you just haven't found the time yet or if there is anything wrong with this. Thank!

Martin-Idel commented 1 year ago

I added one minor commit to ensure that the description is immediately read by screen readers.

albanm commented 1 year ago

Sorry about that, I am a little overworked in this period. But at some point soon I will catch up on pull requests.

Hopefully in the meantime you can use your fork directly and are not too slowed down by me (it is pretty straightforward to build and push a fork on npm in another namespace).

FYI the v2 will soon be considered maintenance only, I don't intend to add significant functionalities. Instead I intend to focus my efforts on working on a draft for the next major version.

Martin-Idel commented 1 year ago

Hi, no big deal. Yes, I'm using my own branch with npm pack for now and it works well.

Regarding the next major version I'm totally on board. We want to switch to vue 3, too and vuetify and vjsf are the blockers for now. The current functionality for vjsf is good - most of our issues are smaller accessibility things.