flet icon indicating copy to clipboard operation
flet copied to clipboard

Missing accessibility properties on various controls

Open zersiax opened this issue 3 years ago • 5 comments

It appears there is no way to set various controls' accessible name using the Flet bindings. There, for example, appears to be no way to make an iconButton screenreader-accessible; tooltip does not suffice here. When building , for example, the counter example in the tutorial, the two buttons are not in any way labeled or distinguishable for assistive tech like screen readers and speech recognition. This is a pretty big no-no, can this be looked into?

zersiax avatar Aug 05 '22 22:08 zersiax

Thanks for bringing up this very important topic! I see there is a lot of materials for Flutter on how to make programs more accessible. Are you testing it on desktop or phone, web, Windows or macOS? Is there any way to test the accessibility on the desktop?

FeodorFitsner avatar Aug 05 '22 23:08 FeodorFitsner

Difficult to say, @FeodorFitsner. I will need to do more testing with other platforms to see to what degree this is a Flutter issue and to what degree this is something Flet can help with. I recommend looking through the linked issues in this issue: https://github.com/flutter/flutter/issues/73819 As well as look at this blog article explaining how the semantics widgets work, for Flet to hook into: https://www.didierboelens.com/2018/07/semantics/ To actually test for accessibility, I would recommend turning on Narrator (ctrl+windows_enter) and using caps+arrow keys to navigate your app's accessibility tree. "Ok Button" is good. "Button" is not good; means there's no label.

zersiax avatar Aug 05 '22 23:08 zersiax

Great! Will check the materials and play with Windows Narrator as well as macOS VoiceOver. Look at this 4 min video: https://www.youtube.com/watch?v=A6Sx0lBP8PI - does it look like something you are looking for?

FeodorFitsner avatar Aug 05 '22 23:08 FeodorFitsner

Exactly. In fact, I reached out to Victor , the person in the video, to ask for the current state of desktop Flutter Accessibility. I'll let you know what comes out of that, as well :)

zersiax avatar Aug 06 '22 00:08 zersiax

Thanks, keep me posted!

FeodorFitsner avatar Aug 06 '22 00:08 FeodorFitsner

Curious how you fixed it in the end? :)

zersiax avatar Aug 22 '22 10:08 zersiax

Ah, sorry, forgot to mention while closing the issue! So, this was the fix: https://github.com/flet-dev/flet/pull/179 This is the docs: https://flet.dev/docs/guides/python/accessibility

It's interesting though - it looks like samantics works in web and on mobile, but not in a macOS desktop app. I tried asking on Flutter discord and haven't got any response. Will submit an issue then. You may give it a try and confirm that.

FeodorFitsner avatar Aug 22 '22 15:08 FeodorFitsner