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

Table dimensions are read as "0 by 0" by Windows Narrator #16923

Open
lkszzajac opened this issue Aug 14, 2024 · 8 comments
Open

Table dimensions are read as "0 by 0" by Windows Narrator #16923

lkszzajac opened this issue Aug 14, 2024 · 8 comments
Assignees
Labels
domain:accessibility This issue reports an accessibility problem. package:table squad:core Issue to be handled by the Core team. support:1 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@lkszzajac
Copy link

lkszzajac commented Aug 14, 2024

📝 Provide detailed reproduction steps (if any)

  1. Open any editor and remove its initial content (e.g. https://ckeditor.com/ckeditor-5/demo/feature-rich/)
  2. Create a table (e.g. 3x3, can be empty)
  3. Enable Windows Narrator
  4. Focus the table widget

✔️ Expected result

Narrator reads the widget as a table and announces its dimensions

❌ Actual result

Narrator reads the widget as a table and reports its dimensions as 0x0

narrator-table-0x0.mp4

📃 Other details


If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@lkszzajac lkszzajac added type:bug This issue reports a buggy (incorrect) behavior. package:table domain:accessibility This issue reports an accessibility problem. squad:core Issue to be handled by the Core team. labels Aug 14, 2024
@FilipTokarski FilipTokarski added the support:2 An issue reported by a commercially licensed client. label Aug 14, 2024
@aldonace-wu aldonace-wu added support:1 An issue reported by a commercially licensed client. and removed support:2 An issue reported by a commercially licensed client. labels Aug 14, 2024
@lkszzajac
Copy link
Author

We've checked the behavior in these setups:

Windows/Edge:

  • Narrator - announces the table with "Enter table, 0x0"
  • JAWS - announces the table with "Edit, land, type of text"
  • NVDA - announces the table with "Figure, table, mutliline, blank"

macOS/Chrome:

  • VoiceOver - announces the table with "table" without any dimensions.

macOS/Firefox/Safari:

  • VoiceOver - announces the table with dimensions correctly, does not announce the cells as editable

@Comandeer
Copy link
Member

According to the ARIA spec, elements with the row role (and <tr> elements have it by default) can only contain children with the cell role. However, due to how we implemented nested editables, we overwrite the role of the <td> elements to textbox, creating an accessibility tree that is invalid according to the specification. Probably we should rethink our approach to nested editables in tables.

Some possible solutions:

  • remove the textbox role – however it could lead to loss of information about cells being editable; needs testing,
  • move the textbox role into a dynamically injected div element that would reside inside the cell – sounds quite brittle and error-prone,
  • keep the current structure and provide the table info ourselves – that's a really dirty hack, though.

@Mati365 Mati365 self-assigned this Sep 6, 2024
@Mati365
Copy link
Member

Mati365 commented Sep 9, 2024

@Comandeer I checked few solutions:

remove the textbox role – however it could lead to loss of information about cells being editable; needs testing,

It works, but it stopped announcing that content is editable. At this moment, after focusing the first cell of the table, it's announcing: Tabela, przejdź do tabeli, zero na zero, edytuj, spacja but after modification: Tabela, Przejdź do tabeli, 5 na 6, wejście angielski, kolumna 3 z 5, koniec wiersza. So imo, it's even worse.

move the textbox role into a dynamically injected div element that would reside inside the cell – sounds quite brittle and error-prone,

I tried to add role: textbox to ck-table-bogus-paragraph that is directly under td and removing role: textbox from td. It's not announcing info about editable content, identically as with the missing role: textbox.

keep the current structure and provide the table info ourselves – that's a really dirty hack, though.

I'm not sure. Do you mean adding aria-label to td?

@Comandeer
Copy link
Member

What screen reader did you test? VoiceOver? It would be better to test it in English and to also test JAWS and NVDA.

It works, but it stopped announcing that content is editable. At this moment, after focusing the first cell of the table, it's announcing: Tabela, przejdź do tabeli, zero na zero, edytuj, spacja but after modification: Tabela, Przejdź do tabeli, 5 na 6, wejście angielski, kolumna 3 z 5, koniec wiersza. So imo, it's even worse.

Isn't "wejście angielski" supposed to mean that the field is editable and its language is set to English? 🤔 Yet it's super cryptic (at least in Polish).

I'm not sure. Do you mean adding aria-label to td?

More of [aria-describedby] on the table/figure with the dimensions of the table.

@Mati365
Copy link
Member

Mati365 commented Sep 9, 2024

@Comandeer

What screen reader did you test? VoiceOver? It would be better to test it in English and to also test JAWS and NVDA.

Microsoft Reader using this HTML file:
index.html

Isn't "wejście angielski" supposed to mean that the field is editable and its language is set to English? 🤔 Yet it's super cryptic (at least in Polish).

Checked, it reads it as "Passed to cell". Nothing about editing.

More of [aria-describedby] on the table/figure with the dimensions of the table.

I checked it using aria-describedby / aria-labeledby and it doesn't work. I tested it using:

      <figure class="table ck-widget ck-widget_with-selection-handle" style="width:29.68%;" contenteditable="false" >
         <table class="ck-table-resized" aria-labelledby="trash-desc">
            <tbody>
               <tr>
                  <td class="ck-editor__editable ck-editor__nested-editable" tabindex="-1" role="textbox" aria-labelledby="trash-desc" aria-describedby="trash-desc" contenteditable="true">
                     <span>Cześć!</span>
                  </td>

Basically it read content of trash-desc but always append 0 x 0 😞


move the textbox role into a dynamically injected div element that would reside inside the cell – sounds quite brittle and error-prone,

imho, it's the only correct way to fix this issue, and seems to be working correctly but it's the most complex one. At this moment Microsoft Narrator does not recognize td tags as cells so it's reading table size as 0x0.

@Mati365
Copy link
Member

Mati365 commented Sep 12, 2024

I added draft PoC of table with adjusted HTML structure that works on Microsoft Narrator: #17083

Unfortunately, it looks it's buggy and needs refactor of major parts of table CSS and investigation why Firefox hangs.

@Witoso
Copy link
Member

Witoso commented Sep 12, 2024

@Mati365 could you prepare a comparison table of screen readers of current solution vs the one you tested.

@Mati365
Copy link
Member

Mati365 commented Sep 12, 2024

@Witoso Checked few screen readers on that table:

obraz

It looks like changing structure of table HTML improved support for Microsoft Narrator and JAWS. NVDA works the same as before.

I did not test Apple VoiceOver.

Microsoft Narrator:

It's improved ✅ 0 by 0 issue has been fixed.

Before: Enter table, 0 by 0, <content editable content>
After: Enter table, 10 by 12, <content editable content>

NVDA

Nothing changed, but it was ok already. ✅

Before: Table, Object with Data, Editing fields, <content editable content>
After: Table, Object with Data, Editing fields, <content editable content>

JAWS

It looks like changing structure of table improved JAWS navigation a lot. ✅

Before: Type and test
After: Terrestrial planets, Diameter (km), (from time to time coordinates of cell in the table), Type and test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:accessibility This issue reports an accessibility problem. package:table squad:core Issue to be handled by the Core team. support:1 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

6 participants