Skip to content
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

Make "participation not allowed" message accessible #4764

Merged
merged 6 commits into from
Feb 23, 2022

Conversation

javierm
Copy link
Member

@javierm javierm commented Dec 28, 2021

References

Objectives

  • Make it easier for keyboard users to navigate through the buttons to vote in favor and against
  • Reduce duplication in the code showing votes

Visual Changes

Before these changes

The message appears when hovering over the buttons to vote:

The buttons to vote and votes information are replaced by a "sign in to continue" message

The message to sign in to comment appears when hovering over the "publish comment" button and the message to sign in to vote appears when hovering over the icons to agree and disagree with a comment:

before.mp4

After these changes

The message appears after clicking a button to vote:

A message to "sign in to continue" appears below the buttons to vote

The message to sign in to comment is displayed at all times and agreeing/disagreeing with comments redirects to the sign in page:

after.mp4

@javierm javierm self-assigned this Dec 28, 2021
@javierm javierm added this to Reviewing in Consul Democracy via automation Dec 28, 2021
@javierm javierm moved this from Reviewing to Doing in Consul Democracy Dec 28, 2021
@javierm javierm force-pushed the refactor_votes branch 3 times, most recently from e4297ce to feeded8 Compare January 14, 2022 15:30
@javierm javierm changed the base branch from refactor_votes to vote_accessibility February 14, 2022 11:17
@javierm javierm marked this pull request as ready for review February 19, 2022 19:44
@javierm javierm moved this from Doing to Reviewing in Consul Democracy Feb 19, 2022
@javierm javierm force-pushed the participation_not_allowed branch 6 times, most recently from aed5bdb to 4aae2ce Compare February 20, 2022 15:23
@javierm javierm removed the Bug label Feb 20, 2022
This message is only shown in the `show` action, so it's shown at most
once in the whole page, so it doesn't take up too much space and it
isn't as overwhelming as if we were showing it on the index page, once
per debate.

We're only showing it when there are closed options, though, since
there's already a message to sign in to comment when the question
accepts open answers.
This way it's consistent with what we get when there are no comments. It
only appears once on the page so it isn't overwhelming.
Not sure whether small or normal is better, but at least it's the same.
Hovering over the votes showed a "participation not allowed" message
which was annoying when scrolling with the browser or simply moving the
mouse around the page. Furthermore, it hid the information about the
number of votes, links to show/collapse replies, ...

We're planning to change the behavior of all the "participation not
allowed" messages in order to show them on click instead of showing them
on hover (just like it's done on touchscreens). In the case of comments,
supports, however, there's very limited space in the part showing the
number of supports for comments, so adding this message without breaking
the layout is challenging.

So, for now, we're simply redirecting unauthenticated users to the login
page. If find an easy way to implement a better user interface in the
future to display the "participation not allowed" message, we might
change this behaviour.
@taitus taitus self-assigned this Feb 23, 2022
@javierm javierm force-pushed the participation_not_allowed branch 4 times, most recently from 47cee46 to fbe11cb Compare February 23, 2022 15:29
We were using the same logic six times regarding when we should show a
"participation not allowed" message. Since we're going to change the
current behavior, we're unifying the logic in one place so the changes
will be easier.
Defining a behavior on hover means making it different for people using
a keyboard or a touchscreen (most of the population, nowadays).

In this case, we had an accessibility issue where the message wouldn't
disappear once it appeared. That meant that, after tabbing through all
the links and buttons in, for instance, the debates index, the page
would be filled with "participation not allowed" messages, and in order
to see the information about how many people have voted, reloading the
page was required.

For touchscreen users the behavior was similar to what we get on hover,
although we've found some inconsistencies when trying to support several
elements on the same page.

We think in proposals it makes sense to hide the "support" button when
users click on it, and the same applies to the buttonsto support and
vote investment projects. However, we aren't hiding the buttons to
agree/disagree with a debate in order to keep the information about the
current number of people agreeing and disagreeing visible.

Note we're removing some support spec methods because after these
changes the duplication isn't as obvious as it was in the past.
Consul Democracy automation moved this from Reviewing to Testing Feb 23, 2022
Base automatically changed from vote_accessibility to master February 23, 2022 16:45
@javierm javierm merged commit 074934c into master Feb 23, 2022
Consul Democracy automation moved this from Testing to Release 1.5.0 Feb 23, 2022
@javierm javierm deleted the participation_not_allowed branch February 23, 2022 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accessibility focus message
2 participants