-
Notifications
You must be signed in to change notification settings - Fork 76
Disable checkboxes (#154) #190
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
Conversation
Can you post some screenshots?
Feel free to prototype this if you are inclined. See comments from @j-steinbach (who is not fan of using checkboxes to style tasklists) at #181 (reply in thread) |
I'll do it if I find some free time. Right now pretty much is happening in my private life. |
Also got lots of stuff going on, but I will try my hand on some more mockups. Probably the weekend. |
Here are the checkboxes made using the ballot box unicode characters, as proposed in #181 (comment). Using the Note that, as the checkbox is now a regular character, it can be selected and copied. This may be considered a feature or a misfeature (and, I think, can be avoided if needed). However, in my opinion this does not look consistent with the rest of the site style. |
I think the simple un-ticked checkbox is fine (i mean, its a simple box..), but you are right, the ticked variant doesn't really fit. Sorry about that :/ I am also not a big fan of the styled variants. I guess that means we should go back to the disabled html-checkboxes, maybe with a size of |
I've prepared two variants of SVG-based checkboxes. The checkboxes are just |
@kukimik Is there a live demo of that somewhere? Just want to test in different OS, display resolutions (I have 5k monitor, for instance). |
https://kukimik.github.io/out1/index.html Unfortunately there is some problem with fonts loading, so I pushed the prototype in the current PR. You just need to comment out one of the variants in Keep in mind that this is just a prototype, prepared to check whether the appearance of the checkboxes is acceptable. The As the image is going to be used in different places ( |
@kukimik out1 looks good to me, let's go with that. Is there a way to prevent checkbox from being selected/copied along with text? The current version already does that. No need to create a separate .svg file; you can just create a separate .tpl file -- |
I switched to inline SVG and used the
This is an abuse (as far as I know
I don't know how to handle this better.
Nice! |
c43988a
to
c0219c4
Compare
c0219c4
to
c39e806
Compare
c39e806
to
a79035f
Compare
I just parametrized @srid Is there something more to be done here? |
This disables the checkboxes, as discussed in #154.
I decided to submit this solution, because it is simple, it is consistent with the tasks template.
The downside is that the checkboxes appear gray/less opaque/hardly visible etc., depending on your browser. Changing this is possible, but rather complicated, because checkboxes are displayed using platform-native styling (see https://developer.mozilla.org/en-US/docs/Learn/Forms/Advanced_form_styling#styling_checkboxes_and_radio_buttons).
Another option is to make the checkboxes unclickable using JS (e.g.
onclick="event.preventDefault()"
), but it's not very intuitive (we have an enabled checkbox, but clicking it has no effect) and moreover I'd be concerned whether this follows the accessibility guidelines.We can also replace the checkboxes with some svg icons (probably with some accessibility-related attributes included).