Name the search button before it has been pressed - #2091
Open
mehranlatifi83 wants to merge 1 commit into
Open
mehranlatifi83 wants to merge 1 commit into
mehranlatifi83 wants to merge 1 commit into
Conversation
The button that opens a search is called by the hint of the field it opens, and that is set when the screen is built. But the field itself is not built until the search is actually opened, and the naming was left waiting on the field: the hint was remembered, and everything else in the method, the name included, was skipped until there was a field to put a hint on. So the button had no name until it had been pressed, which is the one thing that cannot be done without knowing what it is. A screen reader found a button at the top of the screen and could say nothing about it. The name does not depend on the field, so it is given straight away and the rest goes on waiting as before. Thirty one screens ask for that hint, so thirty one search buttons were silent: settings, contacts, the sticker and language lists, the chats themselves, a channel's log, wallpapers, and the rest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The button that opens a search is called by the hint of the field it opens, and that is set when the screen is built. But the field itself is not built until the search is actually opened, and the naming was left waiting on the field: the hint was remembered, and everything else in the method, the name included, was skipped until there was a field to put a hint on.
So the button had no name until it had been pressed, which is the one thing that cannot be done without knowing what it is. A screen reader found a button at the top of the screen and could say nothing about it.
The name does not depend on the field, so it is given straight away and the rest goes on waiting as before.
Thirty one screens ask for that hint, so thirty one search buttons were silent: settings, contacts, the sticker and language lists, the chats themselves, a channel's log, wallpapers, and the rest.
Checking it
With TalkBack on, open Settings and swipe onto the search button at the top of the screen.
Before, it had no name. Open the search once and come back, and it had one — which is the whole of the bug: the name was waiting on a field that is not built until the search is opened, so the button was nameless until it had been pressed.
Now it is named from the start. Thirty one screens ask for that hint, so check a few others: contacts, the sticker and language lists, wallpapers.