dotnet / dotnet/maui

[Bug] ClearButtonVisibility on Entry is currently not accessible

Open
#3,384 7 comments 0 reactions 0 assignees View on GitHub
area-controls-entry s/triaged s/verified t/a11y t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 15h
Merged PRs (30d)
290

Description

### Description

Clearbutton is just a drawable set on the underlying TextView via this
editText.SetCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null)

So, it's not going to be reachable by a screen reader. This will mostly likely need to be solved via Custom Actions or by changing the current solution.

The native SearchView control is an EditText box with a reachable clear button so the fix here might be to switch to using a view for the clear opposed to a drawable.
i.e. here's the SearchView layout on android. Notice how the ImageView's have focusable/contentDesc's set

https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:appcompat/appcompat/src/main/res/layout/abc_search_view.xml;l=20?q=abc_search_view

Contributor guide

Open the contributing guide

Research direction

Start with the Android Entry implementation and inspect how ClearButtonVisibility applies the drawable through SetCompoundDrawablesWithIntrinsicBounds. Compare it with the linked AndroidX SearchView layout, especially its focusable ImageView and content description. Done means the Entry clear button is reachable and usable by a screen reader without relying only on the drawable.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
accessibility, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.