Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No box is displayed for screen reader when reading widget #13

Open
wanchao-xu opened this issue Mar 18, 2022 · 7 comments
Open

No box is displayed for screen reader when reading widget #13

wanchao-xu opened this issue Mar 18, 2022 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@wanchao-xu
Copy link

wanchao-xu commented Mar 18, 2022

I developed the accessibility for flutter-tizen, refer to flutter-tizen/engine#254

There is a box displayed for the widget which is reading.

m-1215-1-2022-03-18-101409

On android/ios, this box is provied by platform accessibility, the flutter just send the accessibility event to platform, then the box is displayed and widget information is reading.

Tizen platform doesn't provide this box, for example, when screen reader is reading efl widget, screen reader send event to notify efl widget, then efl widget show the box. So when the widget of flutter-tizen is reading, the widget should provide a box.

To display the box, I think there are two ways.

  1. Modify the flutter engine, implement the box view for the widget.
  2. Make the screen reader to provide the box, but this way need to modify efl and chromium-efl.
@bwikbs
Copy link
Member

bwikbs commented Mar 18, 2022

I guess..
Currently we don't have any parts that use chromium-efl. what does it mean?

@wanchao-xu
Copy link
Author

flutter-tizen doesn't use chromium-efl, I mean if modify screen reader to provide box, the efl/chromium-efl should be changed not display box.

@bwikbs
Copy link
Member

bwikbs commented Mar 24, 2022

I'm sorry...but I can not understand it well.
Can you explain a little more? I can't imagine know how screen leader draws the box...

@wanchao-xu
Copy link
Author

Screen reader will read tapped view after accessibility enabled, and a box should be drawn on tapped view at the same time.
The box is drawn by android/ios platform for flutter app, but it's not supported on tizen platform.

If a app is developed by efl on tizen platform, when screen reader is reading the tapped view, this box is drawn by efl view. Screen reader just send a event to efl view, and efl draw this box. If the app is web(displayed by chromium-efl), chromium-efl also implemented the box as efl. So the flutter-tizen should draw the box by itself.

I think the box can be drawn by two ways:

  1. Modify flutter-tizen to draw the box, this way is like efl, we should modify the flutter widget(dart) to provide the box.
  2. Tizen platform draw this box, this way like android/ios, so I consider whether the screen reader draw this box.

@bwikbs
Copy link
Member

bwikbs commented Mar 24, 2022

Thank you for a detailed explanation. 👏
There's more questions.
How draws other platform of flutter do this?
I mean.. Do you know which API is used for this at android?

@wanchao-xu
Copy link
Author

Android use AccessibilityNodeProvider to connect flutter accessibility to system accessibility.
Please refer to https://tool.oschina.net/uploads/apidocs/android/reference/android/view/accessibility/AccessibilityNodeProvider.html

/**
 * Bridge between Android's OS accessibility system and Flutter's accessibility system.
 *
 * <p>An {@code AccessibilityBridge} requires:
 *
 * <ul>
 *   <li>A real Android {@link View}, called the {@link #rootAccessibilityView}, which contains a
 *       Flutter UI. The {@link #rootAccessibilityView} is required at the time of {@code
 *       AccessibilityBridge}'s instantiation and is held for the duration of {@code
 *       AccessibilityBridge}'s lifespan. {@code AccessibilityBridge} invokes various accessibility
 *       methods on the {@link #rootAccessibilityView}, e.g., {@link
 *       View#onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo)}. The {@link
 *       #rootAccessibilityView} is expected to notify the {@code AccessibilityBridge} of relevant
 *       interactions: {@link #onAccessibilityHoverEvent(MotionEvent)}, {@link #reset()}, {@link
 *       #updateSemantics(ByteBuffer, String[], ByteBuffer[])}, and {@link
 *       #updateCustomAccessibilityActions(ByteBuffer, String[])}
 *   <li>An {@link AccessibilityChannel} that is connected to the running Flutter app.
 *   <li>Android's {@link AccessibilityManager} to query and listen for accessibility settings.
 *   <li>Android's {@link ContentResolver} to listen for changes to system animation settings.
 * </ul>
 *
 * The {@code AccessibilityBridge} causes Android to treat Flutter {@code SemanticsNode}s as if they
 * were accessible Android {@link View}s. Accessibility requests may be sent from a Flutter widget
 * to the Android OS, as if it were an Android {@link View}, and accessibility events may be
 * consumed by a Flutter widget, as if it were an Android {@link View}. {@code AccessibilityBridge}
 * refers to Flutter's accessible widgets as "virtual views" and identifies them with "virtual view
 * IDs".
 */
public class AccessibilityBridge extends AccessibilityNodeProvider {

@bwikbs
Copy link
Member

bwikbs commented Mar 25, 2022

Thanks a lot, I learned a lot about accessibility implementation. 👍
(In my personal opinion) It seems to be a more tizen-way to draw it in the engine like efl widget or chromium-efl.
Besides, it is not easy to modify the behavior of efl wiget or chromium-efl too. 😄

@swift-kim swift-kim added the bug Something isn't working label Mar 30, 2022
@swift-kim swift-kim transferred this issue from flutter-tizen/engine Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants