Skip to content
Commit f3409d2b authored by Dan Clark's avatar Dan Clark Committed by Chromium LUCI CQ
Browse files

[Interop] Apply listitem role even if <li> doesn't have layout

The <li> element is supposed to get the listitem role if its
parent is an element with a list role [1]. This role was failing to
be applied if the <li> or its parent had display:contents because
RoleFromLayoutObjectOrNode() has an early return if the element
doesn't have layout.

Fix the issue by lifting the code to apply the listitem role out
of RoleFromLayoutObjectOrNode() so that the role gets applied
regardless of whether the element has layout.

[1] https://www.w3.org/TR/html-aam-1.0/#el-li

Bug: 340200016
Change-Id: I7960e2954ae5650d03e40c6355aa3c665022502f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5535751


Commit-Queue: Dan Clark <daniec@microsoft.com>
Reviewed-by: default avatarAaron Leventhal <aleventhal@chromium.org>
Reviewed-by: default avatarBenjamin Beaudry <benjamin.beaudry@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1300878}
parent 7c2f4854
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment