iftechfoundation / ifdb

The software behind the Interactive Fiction Database (IFDB)
Other
25 stars 18 forks source link

Set time vote controls to "display:none" in the CSS so that they won't appear unless javascript is enabled #1034

Open alice-blue opened 1 week ago

alice-blue commented 1 week ago

(Edited to try to clarify what I am suggesting)

The time vote controls rely on javascript to hide and show the correct sections. We should test what happens if javascript is not enabled, and maybe hide the sections by default in the CSS, since it would look very confusing to show them all at the same time.

And maybe there needs to be a message there that JS is required?

Users with javascript enabled would still see the time vote controls, because there is already javascript in place to display the correct section. If they have javascript enabled, that code will run.

salty-horse commented 1 week ago

Since they give an error if you haven't played the game, they should only be visible if that's true.

dfabulich commented 1 week ago

I think the thought process behind #383 should apply here: if you submit a time vote, we should check the "I've played it" box for you automatically. And so, IMO, the time-vote form should be visible by default (if you're logged in).

alice-blue commented 1 week ago

I think maybe my suggestion didn't come across clearly. Let me try again:

I'm not suggesting we change the experience of users who have javascript enabled. This suggestion would only affect the experience of users who do not have javascript enabled.

The idea is that we set the divs to "display:none" in the CSS. The time controls will still be visible to users who have javascript enabled, because there's already javascript in place to dispay the relevant controls after the page loads. But they won't be visible to people who do not have javascript enabled, because the javascript to display the correct div will not run. For those users, there could be a message that javascript is required.