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

[BITV] 9.1.4.1/3.1 - Styling menubar - active contrast #3860

Closed
1 task done
AndyScherzinger opened this issue Mar 1, 2023 · 22 comments · Fixed by nextcloud-libraries/nextcloud-vue#4319 or nextcloud/server#39277
Closed
1 task done
Assignees
Labels
1. to develop accessibility design Experience, interaction, interface, … needs info

Comments

@AndyScherzinger
Copy link
Member

AndyScherzinger commented Mar 1, 2023

For many elements like "B" and "I", selected styles are visually marked by a pale blue background (1.5:1 to white) and a change of text color (black to blue, 2.2:1). Both remain below the contrast difference of 3:1 that is needed to indicate the state visually. (2)

7d269fef5d1ea6ddaaa3bbb3e5e4230b

Details

https://report.bitvtest.de/default-en/d63601ac-cb34-4645-8256-66bec78964a0.html#checkpoint-45ae33ca9f-v3-n1

@AndyScherzinger AndyScherzinger transferred this issue from nextcloud/server Mar 1, 2023
@AndyScherzinger AndyScherzinger added the design Experience, interaction, interface, … label Mar 1, 2023
@juliushaertl juliushaertl changed the title [BITV] 9.1.4.1/3.1 - Styling menubar - For many elements like "B" and "I", selected styles are visually marked by a pale blue background (1.5:1 to white) and a change of text color (black to blue, 2.2:1). Both remain below the contrast difference of 3:1 that is needed to indicate the state visually. (2) [BITV] 9.1.4.1/3.1 - Styling menubar - active contrast Mar 1, 2023
@juliushaertl
Copy link
Member

@jancborchardt I remember we had discussed the current style, but to match the constrast we'd need to use rather black as the color for the active indicator.

Shall we just switch to the secondary style as the active indicator or would you have any other suggestion?

For comparison the NcButton component, but they don't have dedicated active states

Image

@AndyScherzinger
Copy link
Member Author

AndyScherzinger commented May 22, 2023

@jancborchardt what do you think about #3860 (comment) - pending decision is a blocker for resolving the issue by the devs. However contrast is too low. So everything works here except secondary style.

@jancborchardt
Copy link
Member

Shall we just switch to the secondary style as the active indicator or would you have any other suggestion?

Yes, that sounds the most reasonable and consistent.

@AndyScherzinger
Copy link
Member Author

Yes, that sounds the most reasonable and consistent.

@jancborchardt So everything works here except secondary style. So that can't be used...

@jancborchardt
Copy link
Member

@AndyScherzinger Why does it not work? The contrast as used for the secondary button is even triple-A compliant:
image

@JuliaKirschenheuter
Copy link

JuliaKirschenheuter commented May 30, 2023

@AndyScherzinger Why does it not work? The contrast as used for the secondary button is even triple-A compliant: image

@jancborchardt color is absolutely ok. But the background-color to the white background is not ok ;(
Reference: nextcloud/server#36948
How could we move with it?

And which possibility do we have for the dark mode?

@jancborchardt
Copy link
Member

Then we either need to use the primary style for highlighting (which might be a bit much), or we do it again like we had some time before with the small dot below the active elements. @juliushaertl do we still have CSS for that by any chance?

And if you know what I mean, do you have a preference? I think the version with the dot below the active icon probably looks a bit cleaner.

@juliushaertl
Copy link
Member

juliushaertl commented May 31, 2023

I would prefer the primary then, as the dot is not very common among other editing tools and I think we removed it in the past because it was not easy to discover and looked more like a notification.

I've also looked at other tools and noticed that except apple, all seem to stick to a light background with doesn't match contrast requirements.

Could we come up with a global definition of how active style of a button or element is indicated? The current style is also used in other places or there are other parts where the contrast doesn't match in a similar way:

@jancborchardt
Copy link
Member

@juliushaertl you're right, for active app nav and app content list we already are switching to primary style as per @JuliaKirschenheuter, then we should indeed do it here too, and for any other active style.

@JuliaKirschenheuter
Copy link

@jancborchardt ok, does it means that all active elements like

7d269fef5d1ea6ddaaa3bbb3e5e4230b

would have styles from primary (button), like

Image

right?

Another alternative would be to use high contrast border. What would you prefer?

@jancborchardt
Copy link
Member

jancborchardt commented May 31, 2023

@JuliaKirschenheuter yes, we should use primary style as indicator for active items. This is what e.g. iOS Notes does as well, as @juliushaertl mentioned.


Additionally but separately, we need to fix our secondary button style as it's not accessible.

If we look at Material Design as reference, they have:
https://m3.material.io/components/all-buttons

  • 2 Filled button: our primary
  • 3 Filled tonal button: our secondary – so theirs is not accessible?
  • 4 Outlined button: We could move our secondary to this?
  • 5/6 Text/icon button: Our tertiary

@nextcloud/designers what do you think? I'd say just moving to outline style for secondary button is simplest and safest.

@JuliaKirschenheuter
Copy link

  • 3 Filled tonal button: our secondary – so theirs is not accessible?

If i understood @michaelnissenbaum correct: it depends on a context. An active button have to have min. 3:1 contrast. In which cases are we using our secondary buttons?

If we would use "4 Outlined button" as secondary button - that would be accessible, yes.

@JuliaKirschenheuter
Copy link

by the way, Material Design is not immediately accessible.
Here is a same problem
Screenshot from 2023-05-31 15-37-21
as was reported in our issue: nextcloud/server#36947

@jancborchardt
Copy link
Member

Yep exactly. So we should move our secondary button from tonal to outlined, so that when we use it, it is accessible. :)

@juliushaertl
Copy link
Member

As mentioned in chat outline is not very clear to differentiate then to the focus state.

@jancborchardt I think we need the design team here to jump in and bring up mockups as clear definition for the following buttons adding additional states.

Might be enough to define those for tertiary buttons for the use cases I know of.

States we have

Normal

Screenshot 2023-06-14 at 10 47 36

Disabled

Screenshot 2023-06-14 at 10 47 41

Focus

Screenshot 2023-06-14 at 10 49 07

States we'd need definition

  • Active
  • Active focus

References of existing usages of this case

Text

Screenshot 2023-06-14 at 10 54 31

Collabora

Screenshot 2023-06-14 at 10 56 04

AppNavigationItem (not a button but should probably use a similar style)

Screenshot 2023-06-14 at 10 56 43

@JuliaKirschenheuter
Copy link

Suggestion for hover (like focus state)

Hover

Screenshot 2023-06-14 at 10 49 07

@JuliaKirschenheuter
Copy link

https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html

@luka-nextcloud
Copy link
Contributor

Do we have final decision and a summary of it here?

@juliushaertl
Copy link
Member

Still up for discussion, let's wait for feedback from designers on this one.

@JuliaKirschenheuter
Copy link

this is done

@juliushaertl
Copy link
Member

@JuliaKirschenheuter We would still need to switch to a different active style, right? We can take care of that using nextcloud-libraries/nextcloud-vue#4344, but maybe you can quickly confirm that this is required.

@susnux
Copy link
Contributor

susnux commented Nov 7, 2023

@JuliaKirschenheuter is this fixed? I thought only the focus issues was solved, what about the active state?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop accessibility design Experience, interaction, interface, … needs info
Projects
Archived in project
7 participants