WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
136415
AX: CSS table display styles can cause malformed, inaccessible AXTables to be exposed to the AX tree
https://bugs.webkit.org/show_bug.cgi?id=136415
Summary
AX: CSS table display styles can cause malformed, inaccessible AXTables to be...
James Craig
Reported
2014-08-31 04:03:21 PDT
AX: CSS table display styles can cause malformed, inaccessible AXTables to be exposed to the AX tree <
rdar://problem/18188694
>
Attachments
patch
(11.42 KB, patch)
2015-08-05 11:12 PDT
,
Nan Wang
no flags
Details
Formatted Diff
Diff
patch
(11.45 KB, patch)
2015-08-05 11:44 PDT
,
Nan Wang
no flags
Details
Formatted Diff
Diff
patch
(11.48 KB, patch)
2015-08-05 16:20 PDT
,
Nan Wang
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews104 for mac-mavericks-wk2
(589.40 KB, application/zip)
2015-08-05 17:00 PDT
,
Build Bot
no flags
Details
patch
(13.19 KB, patch)
2015-08-06 11:41 PDT
,
Nan Wang
no flags
Details
Formatted Diff
Diff
patch
(22.62 KB, patch)
2015-08-07 12:52 PDT
,
Nan Wang
cfleizach
: review-
Details
Formatted Diff
Diff
patch
(22.09 KB, patch)
2015-08-09 01:58 PDT
,
Nan Wang
cfleizach
: review+
Details
Formatted Diff
Diff
patch
(22.16 KB, patch)
2015-08-09 12:23 PDT
,
Nan Wang
no flags
Details
Formatted Diff
Diff
test case
(2.76 KB, text/html)
2015-08-11 13:40 PDT
,
James Craig
no flags
Details
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Nan Wang
Comment 1
2015-08-05 11:12:17 PDT
Created
attachment 258285
[details]
patch
Nan Wang
Comment 2
2015-08-05 11:44:26 PDT
Created
attachment 258290
[details]
patch fixed the test
chris fleizach
Comment 3
2015-08-05 13:04:00 PDT
so does this patch make the table inaccessible completely? i think what we want to do is make sure that row 2 and column 2 actually appear in the table in the right form (rather than making it inaccessible or making the whole table inaccessible) when i test with the test case, VO cannot navigate to column 2 or row 2. I think we want to make sure that that works rather than marking things ignored
Nan Wang
Comment 4
2015-08-05 13:40:09 PDT
(In reply to
comment #3
)
> so does this patch make the table inaccessible completely? > > i think what we want to do is make sure that row 2 and column 2 actually > appear in the table in the right form (rather than making it inaccessible or > making the whole table inaccessible) > > when i test with the test case, VO cannot navigate to column 2 or row 2. I > think we want to make sure that that works rather than marking things ignored
The fix makes the contents in the table accessible. The CSS display style has changed the table hierarchy to be only one row and one cell, and our rows and cells become children of that cell. So which part of the project should I look at, that it modifies the hierarchy based on CSS?
chris fleizach
Comment 5
2015-08-05 13:42:42 PDT
(In reply to
comment #4
)
> (In reply to
comment #3
) > > so does this patch make the table inaccessible completely? > > > > i think what we want to do is make sure that row 2 and column 2 actually > > appear in the table in the right form (rather than making it inaccessible or > > making the whole table inaccessible) > > > > when i test with the test case, VO cannot navigate to column 2 or row 2. I > > think we want to make sure that that works rather than marking things ignored > > The fix makes the contents in the table accessible. The CSS display style > has changed the table hierarchy to be only one row and one cell, and our > rows and cells become children of that cell. > > So which part of the project should I look at, that it modifies the > hierarchy based on CSS?
Not sure, let me see the results of this patch first
Nan Wang
Comment 6
2015-08-05 13:46:58 PDT
(In reply to
comment #5
)
> (In reply to
comment #4
) > > (In reply to
comment #3
) > > > so does this patch make the table inaccessible completely? > > > > > > i think what we want to do is make sure that row 2 and column 2 actually > > > appear in the table in the right form (rather than making it inaccessible or > > > making the whole table inaccessible) > > > > > > when i test with the test case, VO cannot navigate to column 2 or row 2. I > > > think we want to make sure that that works rather than marking things ignored > > > > The fix makes the contents in the table accessible. The CSS display style > > has changed the table hierarchy to be only one row and one cell, and our > > rows and cells become children of that cell. > > > > So which part of the project should I look at, that it modifies the > > hierarchy based on CSS? > > Not sure, let me see the results of this patch first
Ok, I'll keep investigating.
Nan Wang
Comment 7
2015-08-05 14:37:35 PDT
Another approach, when the AccessibilityTable object is adding children, once we see an invalid row (Row-Cell-Rows) hierarchy, we ignore the invalid row and add the correct rows(the children of cell) instead. Working on the approach and layout test right now.
Nan Wang
Comment 8
2015-08-05 16:20:06 PDT
Created
attachment 258318
[details]
patch Patch with new approach and fixed the issue that table is exposed as AXGrid instead of AXTable. Updated test expectations as well.
chris fleizach
Comment 9
2015-08-05 16:30:25 PDT
Comment on
attachment 258318
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=258318&action=review
> Source/WebCore/accessibility/AccessibilityARIAGrid.cpp:97 > + // CSS display style can change the table hierarchy and cause the table to be malformed.
how does CSS display change the table hierarchy? it's a strange thing because the DOM looks ok
> Source/WebCore/accessibility/AccessibilityARIAGrid.cpp:103 > + if (is<AccessibilityTableRow>(*cellChild)) {
should this be more generic? why just table rows? what if we had a group -> group > row would we catch that? is there something specific about this CSS variation that always creates this specific render tree hierarchy?
> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:-1921 > - { GridRole, NSAccessibilityGridRole },
what was the bug that this changed with? it seems correct to keep it as TableRole, but wondering how it broke
> LayoutTests/accessibility/mac/malformed-table.html:49 > + shouldBe("columnCount", "2");
we need to check cellForColumnAndRow we need get the elements out of the table through it's rows method, it's cells method and children method and verify that the role is correct for each child in those cases
Nan Wang
Comment 10
2015-08-05 16:38:35 PDT
Comment on
attachment 258318
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=258318&action=review
>> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:-1921 >> - { GridRole, NSAccessibilityGridRole }, > > what was the bug that this changed with? it seems correct to keep it as TableRole, but wondering how it broke
I think in
https://bugs.webkit.org/show_bug.cgi?id=146011
, I changed element with "grid" role to use GridRole. Before that "grid" is mapped to TableRole.
Build Bot
Comment 11
2015-08-05 17:00:16 PDT
Comment on
attachment 258318
[details]
patch
Attachment 258318
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/20603
New failing tests: accessibility/roles-exposed.html
Build Bot
Comment 12
2015-08-05 17:00:20 PDT
Created
attachment 258323
[details]
Archive of layout-test-results from ews104 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
chris fleizach
Comment 13
2015-08-05 17:14:38 PDT
(In reply to
comment #10
)
> Comment on
attachment 258318
[details]
> patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=258318&action=review
> > >> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:-1921 > >> - { GridRole, NSAccessibilityGridRole }, > > > > what was the bug that this changed with? it seems correct to keep it as TableRole, but wondering how it broke > > I think in
https://bugs.webkit.org/show_bug.cgi?id=146011
, I changed element > with "grid" role to use GridRole. Before that "grid" is mapped to TableRole.
sad I let this slip through What we want is to map aria "grid" -> WebCore::GridRole, but then map WebCore::GridRole to NSAccessibilityTableRole that way, in the accessibility node inspector it will say "grid" but for the mac platform it says "table"
Nan Wang
Comment 14
2015-08-06 11:41:17 PDT
Created
attachment 258382
[details]
patch
chris fleizach
Comment 15
2015-08-06 11:43:02 PDT
Comment on
attachment 258382
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=258382&action=review
> Source/WebCore/accessibility/AccessibilityARIAGrid.cpp:91 > + if (!rowChild->isTableRow() || (rowChild->renderer() && rowChild->renderer()->isAnonymous())) {
shouldn't this check be in isTableRow()
Nan Wang
Comment 16
2015-08-06 12:01:02 PDT
Comment on
attachment 258382
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=258382&action=review
>> Source/WebCore/accessibility/AccessibilityARIAGrid.cpp:91 >> + if (!rowChild->isTableRow() || (rowChild->renderer() && rowChild->renderer()->isAnonymous())) { > > shouldn't this check be in isTableRow()
I tested with a case that table with CSS and no ARIA, and that made the table totally inaccessible by returning no rows. I think in AccessibilityTable::addChildren(), is<AccessibilityTableRow> is using the isTableRow() check. And the addChildren() logic is different from AccessibilityARIAGrid::addChildren(), so I'm little hesitate to break that logic.
Nan Wang
Comment 17
2015-08-07 12:52:00 PDT
Created
attachment 258521
[details]
patch Fixed an issue that when CSS is added to a table with no ARIA roles, it's not getting the correct column and row information.
chris fleizach
Comment 18
2015-08-09 01:26:48 PDT
Comment on
attachment 258521
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=258521&action=review
> Source/WebCore/ChangeLog:9 > + CSS table display styles sometime can change the hierarchy of a table, making child objects to be anonymous.
Apply CSS display styles to tables can end up inserting anonymous RenderTableRows, which is not handled well by the accessibility code, which treats these as the actual rows. We can address this by diving deeper into anonymous nodes and finding the real rows and cells we want. In addition, another thing also causing malformed tables is that "grid" roles are being exposed as AXGrid instead of AXTable.
> Source/WebCore/accessibility/AccessibilityTable.cpp:480 > continue;
instead of having a continue here and then the other case below, i think it should be if/else which should make it clearer to understand that we have two cases
> Source/WebCore/accessibility/AccessibilityTableCell.cpp:88 > + // The RenderTableCell's table() object might be anonymous sometimes. We should handle it gracefully
This new code seems to ignore the perils of the comment above. I think we should do a check for the renderTable if it's anonymous, then go up the render->parent() chain until we find a non anonymous RenderTable parent. then do the original logic (and leave the original comment)
> Source/WebCore/accessibility/AccessibilityTableRow.cpp:107 > + if (parentTable.node() != nullptr)
this should be if (parentTable.node()) break;
Nan Wang
Comment 19
2015-08-09 01:58:46 PDT
Created
attachment 258591
[details]
patch
chris fleizach
Comment 20
2015-08-09 12:10:52 PDT
Comment on
attachment 258591
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=258591&action=review
Just some minor comments. Can you upload a patch to address those small comments? Thanks
> Source/WebCore/ChangeLog:9 > + Apply CSS display styles to tables can end up inserting anonymous RenderTableRows, which is not handled well by the
Apply-> Applying
> Source/WebCore/accessibility/AccessibilityTableCell.cpp:97 > + // The RenderTableCell's table() object might be anonymous sometimes. We should handle it gracefully
End the sentence with a period
> LayoutTests/accessibility/mac/malformed-table.html:39 > + <th>Heading one</th>
It looks like there are some tabs in here instead of spaces like the rest of the file
Nan Wang
Comment 21
2015-08-09 12:19:29 PDT
Comment on
attachment 258591
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=258591&action=review
>> Source/WebCore/accessibility/AccessibilityTableCell.cpp:97 >> + // The RenderTableCell's table() object might be anonymous sometimes. We should handle it gracefully > > End the sentence with a period
The sentence is not finished, there's another line below.
>> LayoutTests/accessibility/mac/malformed-table.html:39 >> + <th>Heading one</th> > > It looks like there are some tabs in here instead of spaces like the rest of the file
Ok
Nan Wang
Comment 22
2015-08-09 12:23:27 PDT
Created
attachment 258596
[details]
patch
WebKit Commit Bot
Comment 23
2015-08-09 18:53:29 PDT
Comment on
attachment 258596
[details]
patch Clearing flags on attachment: 258596 Committed
r188203
: <
http://trac.webkit.org/changeset/188203
>
WebKit Commit Bot
Comment 24
2015-08-09 18:53:35 PDT
All reviewed patches have been landed. Closing bug.
James Craig
Comment 25
2015-08-11 11:04:02 PDT
<
rdar://problem/22026625
>
James Craig
Comment 26
2015-08-11 12:20:34 PDT
This bug depends on
bug 146011
.
James Craig
Comment 27
2015-08-11 13:40:50 PDT
Created
attachment 258749
[details]
test case
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug