For #7966: Update toolbar content description. (#12667)

releases/v79.1.0
Mihai Adrian Carare 4 years ago committed by GitHub
parent 37af9df3ad
commit 9c1b586e45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -316,11 +316,20 @@ class SearchFragment : Fragment(), UserInteractionHandler {
updateSearchWithLabel(it)
updateClipboardSuggestion(it, requireContext().components.clipboardHandler.url)
updateSearchSuggestionsHintVisibility(it)
updateToolbarContentDescription(it)
}
startPostponedEnterTransition()
}
private fun updateToolbarContentDescription(searchState: SearchFragmentState) {
val urlView = toolbarView.view
.findViewById<InlineAutocompleteEditText>(R.id.mozac_browser_toolbar_edit_url_view)
toolbarView.view.contentDescription =
searchState.searchEngineSource.searchEngine.name + ", " + urlView.hint
urlView?.importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_NO
}
override fun onResume() {
super.onResume()

Loading…
Cancel
Save