fix(target-size): ignore widgets that are inline with other inline elements#5000
fix(target-size): ignore widgets that are inline with other inline elements#5000WilcoFiers merged 11 commits intodevelopfrom
Conversation
WilcoFiers
left a comment
There was a problem hiding this comment.
I think you went off track with this fix. The real issue I think is much simpler, that we just need to be allow inline-block elements to be considered inline for the purpose of target-size (as that's the permissive approach for it) and for them to be blocks for link-in-text-block (as that's the permissive approach there).
While reviewing #5000 I found the approach wasn't working as I was expecting. Playing around with examples I found a simpler way to do this. IDK if this is everything we should do, but I think this gets us close. I decided to put this in its own PR since this was too much code to put into comments.
…-core into target-size-inline
b204032 to
6e35ae1
Compare
chutchins25
left a comment
There was a problem hiding this comment.
Review
1. Test describe block uses stale option name (Important)
test/commons/dom/is-in-text-block.js:335
The describe block is labeled 'with options.permissive: true' but the option was renamed to includeInlineBlock (by #5009). Should be updated to match the actual API.
2. Test description contradicts assertion (Important)
test/commons/dom/is-in-text-block.js:387
The test 'returns true if inline-block element has a sibling on the same line' asserts isFalse. The test passes because "world" is shorter than "button 2" so the length comparison fails — but the description claims the opposite result. Please update the description to match the actual expected behavior.
3. PR title typo (Suggestion)
Minor: "wigets" → "widgets" in the PR title.
WilcoFiers
left a comment
There was a problem hiding this comment.
LGTM. I contributed too much to this. I don't think I can approve this.
### [4.11.2](v4.11.1...v4.11.2) (2026-03-30) ### Bug Fixes - **aria-valid-attr-value:** handle multiple aria-errormessage IDs ([#4973](#4973)) ([9322148](9322148)) - **aria:** prevent getOwnedVirtual from returning duplicate nodes ([#4987](#4987)) ([99d1e77](99d1e77)), closes [#4840](#4840) - **DqElement:** avoid calling constructors with cloneNode ([#5013](#5013)) ([88bc57f](88bc57f)) - **existing-rule:** aria-busy now shows an error message for a use with unallowed children ([#5017](#5017)) ([dded75a](dded75a)) - **scrollable-region-focusable:** clarify the issue is in safari ([#4995](#4995)) ([2567afd](2567afd)), closes [WebKit#190870](https://github.com/dequelabs/WebKit/issues/190870) [WebKit#277290](https://github.com/dequelabs/WebKit/issues/277290) - **scrollable-region-focusable:** do not fail scroll areas when all content is visible without scrolling ([#4993](#4993)) ([240f8b5](240f8b5)) - **target-size:** determine offset using clientRects if target is display:inline ([#5012](#5012)) ([69d81c1](69d81c1)) - **target-size:** ignore widgets that are inline with other inline elements ([#5000](#5000)) ([cf8a3c0](cf8a3c0))
Closes: #4392