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

Validation error status icons #3726

Closed
schlessera opened this issue Nov 13, 2019 · 23 comments · Fixed by #4382 or #4942
Closed

Validation error status icons #3726

schlessera opened this issue Nov 13, 2019 · 23 comments · Fixed by #4382 or #4942
Assignees
Labels
Changelogged Whether the issue/PR has been added to release notes. Developer Tools P0 High priority UX WS:UX Work stream for UX/Front-end
Milestone

Comments

@schlessera
Copy link
Collaborator

schlessera commented Nov 13, 2019

The validation error status icons have been changed to be differently colored versions of the AMP logo:

Image 2019-11-13 at 6 16 04 PM

However, one of the guiding principles of WCAG when it comes to color is that it should never serve as the only indicator. More specifically, we would talk about WCAG G14 here: https://www.w3.org/TR/WCAG20-TECHS/G14.html

Following are a few examples of how this is perceived with different forms of color blindness.

Protanopia (red-blind):

image

Deuteranopia (green-blind):

image

Achromatopsia (no colours):

image

First of all, we do have a text representation of the same information here, so it is not necessarily broken right now.

However, there is no direct visual indication that the icon is supposed to relate to the text, and no semantic coding to clearly associate them. It's just an image in a div that is located close to a <select>:

Image 2019-11-13 at 6 26 15 PM

I have two suggestions to improve on this:

Put the shape into the select element

It would be helpful to add the icon inside of the select, instead of outside. That would also clearly show that this is supposed to be the same information, which is not currently the case, especially if you open the dropdown. It just still shows the currently selected one, while showing the text of both options:

Image 2019-11-13 at 6 27 43 PM

Use two distinct shapes that convey meaning

Another aspect, though, is that the actual shape of the icon is meaningless and useless in this context. It is truly only used as a container for the color. Therefore, it might be preferable to use the text itself or its background for the color instead. And if that is not wanted, we should look for two distinct shapes to use as the container for the colors, that also serve to communicate the intent properly.

@westonruter
Copy link
Member

ut the shape into the select element

It would be helpful to add the icon inside of the select, instead of outside. That would also clearly show that this is supposed to be the same information, which is not currently the case, especially if you open the dropdown. It just still shows the currently selected one, while showing the text of both options:

Image 2019-11-13 at 6 27 43 PM

Do you mean put the icons inside the option elements? Unfortunately, this is no possible given the current state of select element stylability today. I did tried. We'd have to use a custom dropdown component as opposed to the native select one.

Use two distinct shapes that convey meaning

Another aspect, though, is that the actual shape of the icon is meaningless and useless in this context. It is truly only used as a container for the color. Therefore, it might be preferable to use the text itself or its background for the color instead. And if that is not wanted, we should look for two distinct shapes to use as the container for the colors, that also serve to communicate the intent properly.

We did discuss this at WCUS a bit at the booth, about whether the icons work as is. I think the a11y color issue did come up, but given there is text in the adjoining select helps mitigate this, as you identified.

The thinking behind the colored AMP badges was to align it with the AMP Validator browser extension.

image image

Nevertheless, it's true that extension does overlay an invalid number count on the badge which would improve accessibility:

image

The validator extension can also show a warning badge:

image

Maybe an exclamation ❗️ overlaying the bottom-right of the red icon would work in this scenario?


Whatever we do here, we should take it as an opportunity to also align the status icons used in the admin bar. For the admin bar, we currently use 🔗 ✅ ⚠️ ❌:

image

But we could instead use:

image image image image

@westonruter westonruter added the UX label Nov 13, 2019
@westonruter
Copy link
Member

The use of red/green AMP icons originated in #2023 (comment)

@cathibosco
Copy link

We should do some visual mocks for us to look at here... we need an official visual language as part of our re-design. Good to know we will have number count here. I was unaware of that.

@westonruter
Copy link
Member

Note: I just discovered that macOS Catalina is no longer rendering a warning emoji in the admin bar:

image

@folletto
Copy link

folletto commented Apr 2, 2020

Hello! I've been pointed out because we had some confusion arising by the green AMP logo being confused with Jetpack... so I was going to mention that, but then by reading this thread I realize this is already being solved in the right direction, so I just want to confirm that I agree with what Alain said:

  1. For accessibility reason, color shouldn't be the (only) way to mark different statuses
  2. It would be better to move the icon inside the dropdown if possible

I'd also add that in terms of branding, it's usually preferable to not use the logo as status indicator, or any functional use, which is even more true if the indicator has a negative meaning.

I think the icon ideas proposed by Weston could be a good way forward:
#2023 (comment)

I was also going to mention to use the Material Design icons, which have been used in Gutenberg, but here I also agree with Weston that reusing Dashicons would allow also allow them to be used in the admin toolbar menu, as it would fit with the icons existing there.

Thus trying to follow and combine all the ideas above (and some from the previous thread), what about using these from Dashicons:

Screenshot 2020-04-02 at 16 36 06

@westonruter westonruter added this to the v1.6 milestone Apr 3, 2020
@westonruter westonruter modified the milestones: v1.6, v1.5.3 Apr 7, 2020
@westonruter
Copy link
Member

For the status of the validation errors, we also need to take into account the new/acknowledged state per #3725. So in keeping with that issue, what about removing the the AMP logo next to each dropdown to only replace with a subtle green/red color clue (purely for additional indication to enhanced the selected Removed/Kept selection) and then to add a new column which captures the new/acknowledged state. In keeping with comments, this column would have the semantics of “Approve” (✔️) and “Unapprove” (✖️):

image

Tapping the button in the Approve column would toggle the new state for the validation error. The four possible states would be:

  1. Unapproved removed: Markup is removed but you haven't confirmed this is doesn't break the page. The default state for most new invalid markup.
  2. Unapproved kept: Markup is kept (disabling AMP) and you haven't yet verified if it is required. The default state for excessive CSS only.
  3. Approved removed: You've verified that the removal of the invalid markup does not break the page
  4. Approved kept: You've decided the invalid markup is required and you are acknowledging that this URL must opt-out of AMP.

The user may switch from approved back to unapproved at any time to mark invalid markup that they need to re-confirm. (In other words, this is “marking as unread”.)

Also, the button to Approve/Unapprove would cause the state to persist in the DB right away. This is in contrast with the Markup Status dropdown, which requires the user to click the Update. This is because the user also needs the ability to Preview the impact of removing/keeping the invalid markup. But there is no such need for the approved state. The approve/unapprove row action links for comments cause immediate state persistence. That being said, the Approve column could be replaced instead with checkboxes, but… I'm wary of this being confused with the checkboxes on the left which allow you to select rows for bulk actions. (Upon checking those checkboxes, then Remove/Kept buttons appear to update the select dropdowns in bulk.)

Nevertheless, if all the rows are “approved” I'm not sure it makes sense to then show the ✖️ icon for each row to toggle back the unapproved state. Should approved rows have the ✔️ instead? Not if we're following the model of comments:

image

image

@folletto
Copy link

folletto commented Apr 7, 2020

I like this direction, and I think that word+border works well too :)

As for the approve/unapprove, it feels a bit opaque. Maybe a label can be used there instead of an icon: "Approved", "Not approved"?

If that gets too long, then maybe having the header say "Approved" could help a bit, as it shows that's a state and not a request.

Checking the other thread, might also be that maybe instead of "Approved" a semantic of "Checked" would do? That would both mean that it's something that needs to be verified, but at the same time it can be reversed to unchecked, and it's clear it's waiting for human intervention. However, it might just be that I'm reading a slightly different semantic here as a non-native speaker.

@westonruter
Copy link
Member

One other wrinkle: for comments, when you approve a comment that causes it to appear (be kept) on the site; when you unapprove a comment, that causes it to be hidden (be removed). This isn't the same semantics for the invalid markup here, as removed/kept is another state which is separate from the state for approval/newness/unread. The approval state here is more about confirmation: do you confirm it is OK to do the action shown in the previous column? Would other icons better represent that concept?

@westonruter
Copy link
Member

We need to update the publish metabox to use the ✅, ⚠️ , and ❌ to indicate the status of the validated URL in the same way that we are using these in the admin bar. If any of the markup is invalid is removed and not approved/confirmed, then the publish metabox should have a ⚠️ with a message that says the user needs to verify that the markup is OK to be removed:

image

@westonruter
Copy link
Member

The green AMP logo would be replaced with ✅
The red AMP logo would be replaced with ❌
And then a new ⚠️ would be added when there is unapproved removed markup.

@westonruter
Copy link
Member

We don't even need the row that says “invalid markup removed: 2”.

@westonruter
Copy link
Member

We'll need to rebrand “new” to “unapproved” here as well probably:

image

@westonruter
Copy link
Member

We also need to change out the AMP icon used on the error index:

image

Using either green/red text or use ✅ and ❌

@westonruter
Copy link
Member

The icon also needs to be changed on the single validation error view:

image

@westonruter
Copy link
Member

We'll also need to change the icons on the validated URL list, removing/replacing the use of the AMP logo and introducing a ⚠️ symbol to compliment the orange “unmoderated” styling:

image

@westonruter
Copy link
Member

For the “Approve” column, we should change to “Approved”:

image

The button would be replaced with a checkbox or rather a new Gutenberg toggle component to differentiate it from the row selection checkbox. If all validation errors are new initially, the Approved column would be filled with toggles that are off and all of the rows would have the orange styling. The user can then go through and toggle each row as they mark them as approved, and as they do the styling for each row would use the orange coloring. If they click the toggle again, the orange coloring would be restored.

@westonruter
Copy link
Member

So like this:

image

Two states are not represented here, but you can see how they'd be represented:

  • Approved & Removed: non-orange background with approve toggle on
  • Unapproved & Kept: orange background with approve toggle off

@westonruter
Copy link
Member

I'm not totally satisfied with the toggle to manage the approved state, and toggling it to indicate approved/confirmed. Maybe I'd have to just try it out for awhile to see if it works.

@folletto
Copy link

folletto commented Apr 8, 2020

For what it's worth, it seems clear to me, probably the clearest approach so far. Maybe a dropdown for that too with an explicit label?

What's your doubt?

Aside: any reason for using "✅❌⚠️" instead of Dashicons or SVG icons in general?

@westonruter
Copy link
Member

Aside: any reason for using "✅❌⚠️" instead of Dashicons or SVG icons in general?

It's hard to type these icons in GitHub comments 😄

But yes, we should look at using Dashicons instead of the Emoji.

@amedina amedina added the P0 High priority label Apr 10, 2020
@westonruter
Copy link
Member

For the validation error index screen, we'll need to add a new row action for Approve/Unapprove (same as comments). They'd appear here:

image

image

@westonruter
Copy link
Member

The fix for the icons (#4382) has been merged! Dashicons are now used. This issue remains open for QA purposes. The fix will be part of the v1.6 release.

@kmyram kmyram added the WS:UX Work stream for UX/Front-end label May 15, 2020
@amedina
Copy link
Member

amedina commented May 18, 2020

QA passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelogged Whether the issue/PR has been added to release notes. Developer Tools P0 High priority UX WS:UX Work stream for UX/Front-end
Projects
None yet
7 participants