Page MenuHomePhabricator

Recite tables
Closed, ResolvedPublic6 Estimated Story PointsFeature

Description

Figure out a way to recite tables. A starting point would be to recite one cell at a time, either by having them as separate utterances or inserting pauses.

Keep in mind that tables are sometimes used for layout and specifically Wikipedia as infoboxes.

You should be able to have column and row "names" read out along with cell content. This helps not getting lost if you can't see the table.

It could be helpful to read out the size of the table (number of rows and columns) when it's announced.

Event Timeline

Some tables may be trickier to recite than others, e.g. when cells have different size (spanning over multiple columns etc.). Should column title be recited before each cell content?

Sebastian_Berlin-WMSE changed the subtype of this task from "Task" to "Feature Request".EditedJun 2 2021, 3:36 PM

I did a quick hack just allowing tables to be segmented and splitting segments on th and td elements. It seems that reading "simple" tables, i.e. no rowspans, colspans or other things that mess up the layout, works fine. It can read left to right, top to bottom (LTR text). Highlighting is non too happy so I had to disable it to work.

This task should only deal with the minimum functionality, i.e. reading the table content in some way. The last to lines in the description should be broken out into separate tasks to be done after this one.

Starting simple with this and seeing how the table on https://en.wikipedia.org/w/index.php?title=Blonde_on_Blonde&diff=1337202611&oldId=1334437678#Outtakes_and_The_Cutting_Edge works.

Just removing the table tag from WikispeechRemoveTags reads out the content. The segmenter doesn't care about cells so the whole table content is one big segment. There are pauses between title and status. I'm guessing these are caused by the TTS seeing newlines (\n) that are at the end of the titles. They should have been cleaned up.

I think the most straightforward way to go is just to break segments on cells. Maybe also other table tags like tr.

When I was about to write a test for this I realised that may not make sense. The only change is to the config and the logic is covered by existing tests.

Change #1243146 had a related patch set uploaded (by Sebastian Berlin (WMSE); author: Sebastian Berlin (WMSE)):

[mediawiki/extensions/Wikispeech@master] Listen to simple tables

https://gerrit.wikimedia.org/r/1243146

This task should only deal with the minimum functionality, i.e. reading the table content in some way. The last to lines in the description should be broken out into separate tasks to be done after this one.

I'm debating this now. It makes sense to split the code changes into smaller patches, but I don't think they'll need their own tasks necessarily.

I'm debating this now. It makes sense to split the code changes into smaller patches, but I don't think they'll need their own tasks necessarily.

I think it is ok to only have this task, and that you make smaller patches in this task as you said. As long as we remember that the task should not be closed to soon if it is not completely done.

Change #1243146 merged by jenkins-bot:

[mediawiki/extensions/Wikispeech@master] Listen to simple tables

https://gerrit.wikimedia.org/r/1243146

I think I'm about done with extra announcement for simple tables, i.e. first row is headers and no cells spanning multiple columns or rows.

I looked around a bit for ways that screen readers do this, but it was hard to find much. There's more about how you're supposed to structure tables to make them play well with screen readers. I found one example of how it may sound and listened to how Orca does it. What I have now read something like this:

TABLE
HEADER: Animal
HEADER: Food
COLUMN, Animal: Monkey
COLUMN, Food: Banana
COLUMN, Animal: Penguin
COLUMN, Food: Fish

where each row is an utterance. The source table in this case looks:

AnimalFood
MonkeyBanana
PenguinFish

I think this sounds good! For theese kinds of tables I can't see a better way of reading it out loud.

Sebastian_Berlin-WMSE changed the point value for this task from 16 to 12.Mar 18 2026, 9:54 AM
Sebastian_Berlin-WMSE changed the point value for this task from 12 to 6.Apr 1 2026, 8:52 AM

Change #1268561 had a related patch set uploaded (by Sebastian Berlin (WMSE); author: Sebastian Berlin (WMSE)):

[mediawiki/extensions/Wikispeech@master] Read tables

https://gerrit.wikimedia.org/r/1268561

Change #1268561 merged by jenkins-bot:

[mediawiki/extensions/Wikispeech@master] Read tables

https://gerrit.wikimedia.org/r/1268561

Things to do in T417886: Release version 0.1.15: