flutter_html icon indicating copy to clipboard operation
flutter_html copied to clipboard

[BUG] AX - Ordered List Item (ol > li) number announced after element

Open alexismandelias opened this issue 5 months ago • 1 comments

Describe the bug:

The announcement of the accessibility reader (Android - Talkback / iOS - VoiceOver) is incorrect for <li> elements which are nested in an <ol> element.

Specifically, the number of the list item is announced after the list item content, whereas it should be announced before the list item content.

See more details below in section Expected behavior.

HTML to reproduce the issue:

<ol>
    <li>First list item</li>
    <li>Second list item</li>
    <li>Third list item</li>
</ol>

Html widget configuration:

const html = '<ol><li>First item</li><li>Second item</li><li>Third item</li></ol>';

Column(
  children: [
    const Text('Before'),
    Html(data: html),
    const Text('After'),
  ],
);

Expected behavior:

AX Reader should announce the following, after the user swipes "next" on each Widget:

"Before" "1. First item. 2. Second item. 3. Second item." "After"

Actual behavior:

AX Reader announces the following, after the user swipes "next" on each Widget:

"Before" "First item. 1. Second item. 2. Second item. 3." "After"

Screen Recording:

https://github.com/user-attachments/assets/575ee55f-6911-4934-8788-1b976c861a47

Device details and Flutter/Dart/flutter_html versions:

flutter --version

Flutter 3.32.4 • channel [user-branch] • unknown source
Framework • revision 6fba2447e9 (8 weeks ago) • 2025-06-12 19:03:56 -0700
Engine • revision 8cd19e509d (8 weeks ago) • 2025-06-12 16:30:12 -0700
Tools • Dart 3.8.1 • DevTools 2.45.1

dart --version

Dart SDK version: 3.8.1 (stable) (Wed May 28 00:47:25 2025 -0700) on "macos_arm64"

flutter_html version

flutter_html: ^3.0.0-beta.2

Additional info:

  • This happens both on Android and on iOS.
  • Using the Accessibility Inspector tool for iOS, I found that the AX label that is generated for the Html widget is: "First item\n1. \nSecond item\n2. \nThird item\n3.".
Image

A picture of a cute animal (not mandatory but encouraged)

My own cat attempting to eat me: Image

alexismandelias avatar Aug 07 '25 16:08 alexismandelias

The same :(

huent-1493 avatar Oct 20 '25 16:10 huent-1493