If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

nsIAccessibleTable::GetCellAt is broken for tables having display:block tbody

NEW
Unassigned

Status

()

Core
Disability Access APIs
3 years ago
3 years ago

People

(Reporter: surkov, Unassigned)

Tracking

(Blocks: 1 bug, {access})

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
if you have something like

<table>
  <tbody style="display:block">
    <tr>
      <td>long blabla</td>
      <td>bla</td>
    </td>
    <tr>
      <td>bla</td>
      <td>bla</td>
    </td>
  </tbody>
</table>

it's rendered as a table but nsTableOuterFrame methods don't work (and as consequence accessible table interface doesn't work too)

The code snippet can be used for scrollable tables, see http://www.imaputz.com/cssStuff/bigFourVersion.html. This bug needs to be fixed for complete fix of bug 1020510.
> it's rendered as a table but nsTableOuterFrame methods don't work 

In what sense?

The layout for the markup you provide has two tables.  There's an outer table that has a single (anonymous) row which has a single (anonymous) cell.  This cell contains a single block (the one for the <tbody>), which contains an (anonymous) table which then contains two rows.

So there are two nsTableOuterFrames here.  Which one are you calling methods on, which methods, and what do you expect them to do?
Flags: needinfo?(surkov.alexander)
(Reporter)

Comment 2

3 years ago
I believe I call it on upper table outer frame. So it sounds like problem should be fixed on a11y side. However from a11y perspective we have one table accessible only (for top HTML table) and I don't have good ideas how to detect this case. For example, how to distinguish it from
<table><tr><td><table><tr><td></td></tr><tr><td></td></tr></table></td></tr></table>

How many tables are created if tbody hadn't display:block style? Btw, why do GetCetllAt(0, 0) may return table itself (not anonymous cell)?
Flags: needinfo?(surkov.alexander)
> However from a11y perspective we have one table accessible only

Is the goal to have table accessibles for markup tables or for layout tables?

Because on this page the markup table structure and the layout table structure are totally different from each other.

> How many tables are created if tbody hadn't display:block style?

Just one.

> Btw, why do GetCetllAt(0, 0) may return table itself (not anonymous cell)?

You mean the content node?  Because there is no "anonymous cell content node".  There's an anonymous frame, but it points to the <table> node, for lack of anything better to to point at.
(Reporter)

Comment 4

3 years ago
(In reply to Boris Zbarsky [:bz] from comment #3)
> > However from a11y perspective we have one table accessible only
> 
> Is the goal to have table accessibles for markup tables or for layout tables?

it's a good question, I always voted to stay closer to layout in terms of a11y tree but it seems many a11y people (including some other browser vendors) disagree (example bug 1007975). 

> > Btw, why do GetCetllAt(0, 0) may return table itself (not anonymous cell)?
> 
> You mean the content node?  Because there is no "anonymous cell content
> node".  There's an anonymous frame, but it points to the <table> node, for
> lack of anything better to to point at.

I see. Is there particular reason to not create a content node for anonymous frame?
Yes.  You have nowhere sane to put it.
(Reporter)

Comment 6

3 years ago
a11y is much based on content, having no content requires special tricks. Could that be a good reason to create content?
No.  Again, there is nowhere sane to put it.  You can't make it an actual parent of the table's kids, because that will totally mess up the DOM, for example.

Again, a11y needs to decide whether it's trying to surface the markup or the layout here.  Or possibly both, separately...
(Reporter)

Comment 8

3 years ago
ok, thanks, Boris. Moving to a11y component then (changing summary)
Component: Layout: Tables → Disability Access APIs
Summary: nsTableOuterFrame::GetCellAt is broken for tables having display:block tbody → nsIAccessibleTable::GetCellAt is broken for tables having display:block tbody
You need to log in before you can comment on or make changes to this bug.