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

[a11y] 11.1.4.3 Contrast (minimum) #4364

Closed
5 tasks done
Tracked by #4398
tschiebel opened this issue Apr 5, 2024 · 8 comments · Fixed by #4429
Closed
5 tasks done
Tracked by #4398

[a11y] 11.1.4.3 Contrast (minimum) #4364

tschiebel opened this issue Apr 5, 2024 · 8 comments · Fixed by #4429

Comments

@tschiebel
Copy link

tschiebel commented Apr 5, 2024

audit: https://infinite.owncloud.com/s/QtwuiGHikwFjozV

https://www.etsi.org/deliver/etsi_en/301500_301599/301549/03.02.01_60/en_301549v030201p.pdf
https://github.com/BIK-BITV/BIK-App-Test/tree/main/Pr%C3%BCfschritte/de

Note 1: For texts (also in the focused state) under 18 points (or bold text below 14 points), the contrast ratio between foreground and background color should be at least 4.5:1. For large fonts, the contrast ratio should be 3:1 or greater.
Note 2: Since the contrast measurements in the test were carried out using screenshots the test results may differ from the actual color values. It is possible that the colors are displayed differently on the screenshot than on the screen of the device. For this reason, the test results should be regarded as guide values.

Personal Space

  • The labelling of the "Browse folder" input field does not meet the contrast requirements for texts, as the contrast ratio is only approx. 2.9:1. [MOVED TO [a11y] 11.1.4.11 Non-text contrast #4365]
    image

  • Both the size information and the time information on the page do not fulfill the contrast requirements for texts, as the contrast ratio is currently well below 4.5:1. The text at the bottom of the page, which shows the number of directories and files also does not meet the contrast requirements for text.
    image

  • The "Manage accounts" button has a visual label in the form of a letter that does not meet the contrast requirements and is barely recognizable.
    image

Menu

  • Although the text with the storage specifications fulfills the contrast requirements, the contrast ratio may be just below the recommended value. To ensure that all users can read the text clearly and distinctly, it is advisable to improve the contrast even further.
    image

Share

  • The size specifications and the note under "Public links" both do not meet the contrast requirements for text.
    image

Edit shared Link

  • The date does not meet the contrast requirements for text.
    image

Spaces

@jesmrec
Copy link
Collaborator

jesmrec commented Apr 9, 2024

  • Learn about contrast measure (what does 3:1 mean?) -> relation between both colors 1:1 to 21:1.
  • Check if back and fore colors are part of the branding.
    • If they are brandable: suggest branding customer/branding team an alternative option
    • If not -> fix contrast
  • Make colors brandable or for everyone in the vanilla app. ¿?

@Aitorbp
Copy link
Contributor

Aitorbp commented Jun 25, 2024

Regarding the colors that need to be changed to meet the contrast requirements, the following research has been carried out:
In the first instance, we wanted to use the colors that Android Studio has in the system (/Library/Android/sdk/platforms/android-33/data/res/values/colors.xml) and they met the contrast requirements.
But these colors have two problems:

  1. Some are private: When you try to access them, Android Studio does not let you compile the application because they are private and cannot be used by us.
  2. It requires an API higher than 31: This restricts users with devices lower than Android 12 from having these colors. If an API lower than 31 is used, Android will set a default color. In this case, using the color system_accent1_500, Android set this purple color on the texts:

Image

In conclusion, I would not use the colors found in the system due to these restrictions and instead, I would take the color that meets the contrast requirements and put it in our colors.xml file, so that we would avoid these restrictions.

If we use the High Contrast accessibility action from the device settings with this color, the behavior would be the same as if we took the color from the system.

Without high contrast fonts:

Image

With high contrast fonts:

Image

@TheOneRing here is the research and my conclusion on the system colors. If there are any other ideas, please let me know.

@Aitorbp Aitorbp linked a pull request Jun 25, 2024 that will close this issue
2 tasks
@Aitorbp
Copy link
Contributor

Aitorbp commented Jun 25, 2024

This issue will be blocked until we know how to proceed with the toolbar elements. The background of the toolbar is brandable (actionbar_start_color) and with the current color of the image of the issue it does not meet the accessibility requirements. If these values ​​were left as default, the toolbar would meet these requirements.
A possible solution is to set the color of the hint text and the cross of the toolbar as a brandable parameter, so that clients can adjust these values ​​to meet the contrast requirements. In this case we would be leaving the contrast in the hands of their branding. Also these texts come by default in Android, they are not altered by us. @tbsbdr @TheOneRing @jesmrec @JuancaG05

@TheOneRing
Copy link

Your approach sounds sensible, please continue.
Could you please open an issue with ownBrander to amend the description for the brandable colors?

@jesmrec
Copy link
Collaborator

jesmrec commented Jun 28, 2024

Could you please open an issue with ownBrander to amend the description for the brandable colors?

sure, i will take care

@JuancaG05
Copy link
Collaborator

JuancaG05 commented Jul 2, 2024

  • The "Manage accounts" button has a visual label in the form of a letter that does not meet the contrast requirements and is barely recognizable.
    image

This one won't be addressed since the avatar is not generated in the app, it comes from the server

@JuancaG05
Copy link
Collaborator

JuancaG05 commented Jul 2, 2024

  • The labelling of the "Browse folder" input field does not meet the contrast requirements for texts, as the contrast ratio is only approx. 2.9:1.
    image
  • The label of the "Search folder" input field does not meet the contrast requirements for text, as the contrast ratio is only approx. 2.9:1.
    image

These will be addressed in #4365, where more changes to the toolbar will be applied

@jesmrec
Copy link
Collaborator

jesmrec commented Jul 2, 2024

About ownBrander stuff. There are not many colors to brand there. Not all of them could be affected by non-matching-contrast colors. On the bottom, i am listing the ones that are affected which description should be updated in oB, if all of you agree

Splash screen background

Splash screen is built with that color on the background and the app icon in the foreground. Here, contrast is not affected since accessibility is not required (no information for dictation or reading)

Login screen

Almost everything is brandable in the login view. In that case, it's in the customer's hand to choose colors with correct contrast. On the other hand, there is no accessibility report regarding login view.

  • Background color
  • Text id and password
  • Hint on id and password fields
  • Background on the login button
  • Text on the login button
  • Connection status
  • Error message

Accessibility contrast: delegated to customer.

Primary color

Well, after checking a little deeper, i'm disappointed with such option. Apart of the FAB, i did not find any place in the app where the "primary color" is set.

Accessibility contrast: The icons inside the buttons are white, so, the color should not be close to the white.

Screenshot 2024-07-02 at 14 03 43

Primary text color

Text color used within the same buttons as the primary color. I only found this as tint color for the bottom bar icons

Accessibility contrast: Should match with the Top bar color in the background

Screenshot 2024-07-02 at 14 03 31

Top bar color

Color of the top bar. But used everywhere in the app: in the search bar, order bar, bottom bar. Also, as color in the details view. That seems to be the real primary color of the app.

Accessibility contrast: The search bar, as we already know, will need a tweak. This color is also used in the details view. I don't like this but we can live with it if the color it not close to the white background.

|Screenshot 2024-07-02 at 14 03 19|Screenshot 2024-07-02 at 14 04 01|

General menu header

Background color on the drawer.

Accessibility contrast: Text is white, so, the color should not be close to the white.

Screenshot 2024-07-02 at 14 07 15

Color of the space card (oCIS)

Color of the space card.

Accessibility contrast: view background is white and text inside is black. Something to be careful of, but in the hands of the customers.

Screenshot 2024-07-02 at 14 09 28

Where should we warn customers about contrast requirements:

  • Login Screen
  • Primary text color (because collisions with top bar)
  • Top bar, because some text is tinted with it

The others, that can collide with white and black could be also involved in problems, but it sounds more weird to have these cases... open to ideas here.

@Aitorbp Aitorbp removed the Sprint label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants