Upvote:1
To enforce limits on cabin luggage, most airlines use a "sizer". It's a sort of open box in which they ask you to put your bag.
You'll see some examples of such sizers in this answer.
Soft bags with contents that can be squeezed or moved are usually not too much of an issue, as long as you are able to fit the bag in the sizer. Beware that when doing so you should also stay within the height allowed, of course.
Upvote:2
Each airline has its rules. Given that you specifically compare against the depth than they must have specified a size for each dimension and hence you have to be without that limit. When the linear size is considered, airlines write their rule in terms of linear size.
It is most common to specify a limit per dimension and each dimension must be up to the stated limit. Very few airlines I know of specify in terms of linear size but some do, mostly for personal items, rather than larger ones. So, I suspect your case does not fall within the rules but the only way to verify is to have the airline rules shown.