[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:Aaron Leventhal <aleventhal@chromium.org> Reviewed-by:
Benjamin Beaudry <benjamin.beaudry@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1300878}
Loading
Please register or sign in to comment