owncloud / android

:phone: The ownCloud Android App
GNU General Public License v2.0
3.77k stars 3.05k forks source link

[a11y] 11.1.4.11 Non-text contrast #4433

Open Aitorbp opened 1 week ago

Aitorbp commented 1 week ago

Related Issues

App:


QA

Aitorbp commented 1 week ago

Changes to SearchView have been made on the following screens:

No changes will be made to the Users and group SearchView in the Share view.

Now, the searchbar includes a new resource with rounded edges, using the same background color (brandable) as the containing toolbar: rounded_search_view.xml

The new color #B4BAC0 of the hint text meets the contrast requirements of the issue:

hint_contrast

The search cross will be in white color to meet the contrast requirements:

cross_contrast
Aitorbp commented 4 days ago

Research: First of all, we need to know that there are two toolbars currently working in the application: RootToolbar and StandardToolbar.

The RootToolbar is displayed in the following views:

The StandardToolbar appears in the following views:

In this PR we are trying to unify the common appearance (colors, size...) of both toolbars in a single place. We are moving the general behaviour of the toolbar from the child classes to the ToolbarActivity, avoiding repeated code. Regarding the StandardToolbar, when we don't want the main_menu (which includes Search, Select all and Share buttons) to be displayed, we override the onCreateOptionsMenu method to not showing it, which is the default behaviour provided in ToolbarActivity.

This way, the following classes don't need to display the main_menu so we override this method to return false (won't be displayed):

We need to do this now because these classes extend from ToolbarActivity and main_menu is attached to it.

On the other hand, we have fixed a bug. Now, when we are in the spaces view, the text hint of the SearchView is Search spaces.