Applying accessibility content description for Seekbar in setOnSeekBarChangedListener and talkback is reading the seek bar rating status in percentage then the content description eg "100% 10 rating very satisfied"
What id did
Calling this function from onProgressChanged and onStopTrackingTouch
Here is code snapshot of function
void setAccessibilityTextForView(View mSeekBar, String msg) {
if (AccessibilityHandler.isAccessibilityEnabled(this)) {
if (mSeekBar != null) {
mSeekBar.setContentDescription(msg)
}
}
}
Actual Result : "100% 10 Rating very satisfied" Expectation: Talkback should ready only the content description I've applied eg "10 rating very satisfied"
I would recommend you rather use the documentation for
stateDescriptionAPI:It seems to indicate that
stateDescriptionshould be the one that gets updated more regularly.I don't know what version of slider you are using or why it's not a
RatingBar(which I know in XML Views inherits from SeekBar) - but I think I can help you out anyway.I think the problem is that you aren't setting the stateDescription:
My XML looks like this:
And the output I get seems to be what you are expecting: