Android Question Adding accessibility to B4XComboBox?

svanneste

Member
Licensed User
Hi,
Putting my own app in Play Console, for internal testing, I got a lot of warnings about missing accessibility. I noticed it is all related to the B4XComboBox. Please, how do you assign a description to this specific object? Thanks
 

svanneste

Member
Licensed User
This is what i got (translated from French) : The label for this element may not be readable by a screen reader..
android:id/content/BALayout[1]/BALayout[1]/MyScrollView[1]/BALayout[1]/BALayout[11]/B4ASpinner[1]
err.png



And this is a sample of code I did use today trying to debug what i could have done wrongly.
And that's why I asked if it was a special way for this particular object because no other B4Xview causes problem for me

B4X:
Sub Class_Globals
    Private Root As B4XView
    Private xui As XUI
    Private B4XComboBox1 As B4XComboBox
End Sub

Public Sub Initialize
'    B4XPages.GetManager.LogEvents = True
End Sub

'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
 
    Main.Accessibility.SetContentDescription(B4XComboBox1.mBase,"description mbase")
    Main.Accessibility.SetContentDescription(B4XComboBox1.cmbBox,"description cmbox")
 
    B4XComboBox1.cmbBox.AddAll(Array As String("A","B","C"))
End Sub

'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.


Private Sub B4XComboBox1_SelectedIndexChanged (Index As Int)
 
End Sub
 
Last edited:
Upvote 0

aeric

Expert
Licensed User
Longtime User
How about add an item like "Select a gender" before populate the items.
 
Upvote 0

Similar Threads

Top