E-mail List Archives
Thread: does talkback should announce a UI control as a button
Number of posts in this thread: 5 (In chronological order)
From: konstantin galiakhmetov
Date: Tue, Jun 23 2020 5:15AM
Subject: does talkback should announce a UI control as a button
No previous message | Next message →
Hello all.
i can not understand how talkback should announce custom controls.?
For example when i am testing web page i am sure that a custom button
implemented using <div> must have the role attribute and must be
announced as a button but when i am testing a native android application
i am doubting. If We have a custom button that is inherited a simple
view talkback does announce this control as a button and i do not know
it is bug or no.
sincerely Konstantin.
From: Laura Fathauer
Date: Tue, Jun 23 2020 6:41AM
Subject: Re: does talkback should announce a UI control as a button
← Previous message | Next message →
I don't know about the programming aspect of it; but yes, TalkBack
should still be able to announce to a user what the role of an element
is. Otherwise the user either won't know that the element is
interactive, or if, it it has an incorrect role, they won't know the
proper interaction.
Laura
On Tue, Jun 23, 2020 at 7:16 AM konstantin galiakhmetov
< = EMAIL ADDRESS REMOVED = > wrote:
>
> Hello all.
>
> i can not understand how talkback should announce custom controls.?
>
> For example when i am testing web page i am sure that a custom button
> implemented using <div> must have the role attribute and must be
> announced as a button but when i am testing a native android application
> i am doubting. If We have a custom button that is inherited a simple
> view talkback does announce this control as a button and i do not know
> it is bug or no.
>
>
> sincerely Konstantin.
>
> > > >
From: Birkir R. Gunnarsson
Date: Tue, Jun 23 2020 3:04PM
Subject: Re: does talkback should announce a UI control as a button
← Previous message | Next message →
If it's a native Android button it will be announced as a button.
If it is a custom element that acts like a button, yes, it needs to be
announced as a button (all interactive elements should have the
appropriate role, that is a WCAG 4.1.2 requirement that applies just
as much on mobile apps as it does to web).
I have a code snippet that assigns a button role to a custom Android
component, but I have to dig it up.
On 6/23/20, Laura Fathauer < = EMAIL ADDRESS REMOVED = > wrote:
> I don't know about the programming aspect of it; but yes, TalkBack
> should still be able to announce to a user what the role of an element
> is. Otherwise the user either won't know that the element is
> interactive, or if, it it has an incorrect role, they won't know the
> proper interaction.
>
> Laura
>
> On Tue, Jun 23, 2020 at 7:16 AM konstantin galiakhmetov
> < = EMAIL ADDRESS REMOVED = > wrote:
>>
>> Hello all.
>>
>> i can not understand how talkback should announce custom controls.?
>>
>> For example when i am testing web page i am sure that a custom button
>> implemented using <div> must have the role attribute and must be
>> announced as a button but when i am testing a native android application
>> i am doubting. If We have a custom button that is inherited a simple
>> view talkback does announce this control as a button and i do not know
>> it is bug or no.
>>
>>
>> sincerely Konstantin.
>>
>> >> >> >> > > > > >
--
Work hard. Have fun. Make history.
From: joe
Date: Tue, Jun 23 2020 4:18PM
Subject: Re: does talkback should announce a UI control as a button
← Previous message | Next message →
For custom elements to provide a custom role you must use
AccessibilityDelegateCompat
(https://medium.com/android-microsoft/android-accessibility-resolving-common
-talkback-issues-3c45076bcdf6#d51f), but realize doing so you are taking
over providing accessibility information for that element if something for
that element is updated.
Better to user native elements for their specified purpose, when possible.
Android does need better support for roles and states in general IMO.
Also, TalkBack users can turn off roles if they really want to:
http://www.accessibility.io/images/Android_TalkBack_Verbosity_Element_Type.p
ng
Thankx,
Joe Humbert
Accessibility Champion
Android & iOS Accessibility Novice
From: Jonathan Avila
Date: Tue, Jun 23 2020 4:52PM
Subject: Re: does talkback should announce a UI control as a button
← Previous message | No next message
In relation to the accessibility delegate- if you set the role but don't update the className of the custom component these custom buttons won't show up in the item chooser for buttons -- changing the custom button's className in the AccessibilityNodeInfo object will allow that to work and have the role announced without having to set the role - so that would seem to be the preferred approach. If you look at the React Mobile accessiblity library they seem to set both.
Jonathan