target-size doesn't respect inline exception for display: inline-block elements #4392
Open
1 task done
Labels
Milestone
Product
axe-core
Product Version
4.9.0
Latest Version
Issue Description
Expectation
The tooltip-button with id
repro
in the repro code below meets SC 2.5.8's Inline exception, so it shouldn't fail thetarget-size
rule.Actual
False positive (it does fail the rule)
How to Reproduce
Run the
target-size
rule against the following repro:Additional context
This was reported as impacting a customer website by one of our internal auditors.
This is happening because the button in question is
display: inline-block
(the default for buttons), which thewidget-not-inline-matches
implementation used astarget-size
's matcher treats as being "block-like" for the purposes of itsisInTextBlock
implementation (its code equivalent of the inline exception).This is related to #3841, but in the other direction; in both cases, the
isInTextBlock
behavior that treats inline-blocks as not being part of surrounding text blocks is the root cause of the issues, but in #3841 that creates false negatives in some circumstances, and here it's instead creating false positives in some circumstances.Like @WilcoFiers mentioned in #3841 (comment), because
inline-block
is the default display for buttons, it's difficult in practice for us to tell whether aninline-block
should be treated as part of surrounding text or not (in the repro example above, both buttons are inline-block, but we'd ideally come up with different answers). I definitely don't think we should blanket-incomplete all inline-block things (that would maketarget-size
treat most buttons as inapplicable), but maybe incompletinginline-block
things that meet the rest of theparentText
/widgetText
comparison inisInTextBlock
could make sense.The text was updated successfully, but these errors were encountered: