Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target offset definition - Wilco and Bruce's suggestions #2798

Merged
merged 4 commits into from Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion guidelines/sc/22/target-size-minimum.html
Expand Up @@ -7,7 +7,7 @@ <h4>Target Size (Minimum)</h4>

<p>The size of the <a>target</a> for <a>pointer inputs</a> is at least 24 by 24 <a>CSS pixels</a>, except where:</p>
<ul>
<li><strong>Spacing:</strong> The <a>target offset</a> is at least 24 CSS pixels to every adjacent target;</li>
<li><strong>Spacing:</strong> The target does not overlap any other target and has a <a>target offset</a> of at least 24 CSS pixels to every adjacent target;</li>
<li><strong>Equivalent:</strong> The function can be achieved through a different control on the same page that meets this criterion.</li>
<li><strong>Inline:</strong> The target is in a sentence or block of text;</li>
<li><strong>User agent control:</strong> The size of the target is determined by the user agent and is not modified by the author;</li>
Expand Down
5 changes: 3 additions & 2 deletions guidelines/terms/22/target-offset.html
@@ -1,6 +1,7 @@
<dt class="new"><dfn data-lt="target offsets">target offset</dfn></dt>
<dd class="new">
<p class="change">New</p>
<p>the distance measured from the farthest point of a target (A), to the nearest point of the second target (B). The offset includes the target and spacing around the target.</p>
<p class="note">The offset from A to B may be different than the offset from B to A, if the sizes of these targets differ.</p>
<p>length of the longest possible line that starts at an edge of a target (A), intersects a second edge of A, and ends at the closest edge of a second target (B). For horizontally aligned targets, target offset is measured with a horizontal line. For vertically aligned targets, target offset is measured with a vertical line. For targets that are neither, target offset is measured diagonally.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the definition "the longest possible line that starts at an edge of a target (A), intersects a second edge of A, and ends at the closest edge of a second target (B)" very hard to understand. It may be necessary to put it in such terms if there is no other way to cope with the many scenarios of target juxtapositions, but people will balk at this and I can understand why.

I also think the logic is not quite clear. It is not obvious that for starting the line for measurement, you should pick the edge that is furthest away from the adjacent target and then move across to the closest edge of the adjacent target. It actually understood, the implicit algorithm of "longest possible line" works fine, but it is far from obvious to the general user base trying to work out what this means.

Copy link

@JAWS-test JAWS-test Jan 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

especially since it is not true that the line must intersect the object again

targetoffset

A triangle and a rectangle. The point A of the triangle is the farthest point of the triangle with respect to the rectangle. A line from point A to the rectangle does not intersect the triangle.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The longest line that starts at an edge of the triangle AND intersects with a second edge of the triangle AND connects with the square can't be the very tip of point A - one pixel in along it left edge would work however.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@detlevhfischer It isn't that different (in practice) from the furthest point of A to the nearest point of B.
The difference is that it must touch two edges of A, so you wouldn't draw it from the very tip of the triangle (from JAWs-test's example).
Also remember that it will be horizontal or vertical if the buttons are at all aligned.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@awkawk I assumed that the new definition should be identical to the old one and was just an attempt to find a new wording. If the new definition isn't supposed to be identical, then you're right, but then I think the new definition is nonsensical.

Copy link
Contributor

@dbjorge dbjorge Jan 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this most recent example from @JAWS-test is a pretty convincing case that the "touch two edges" wording is confusing. I think different testers would interpret the new proposed wording differently - I expect some will assume that the measurement should still be from the point because that is the limit of what the wording would accept as the thickness of the line being used to evaluate the definition approaches zero, but other testers might assume that there needs to be some minimum line thickness (1 css px probably) where the line touches each of the two edges at two different pixels.

I think the wording is also confusing for targets that aren't simple/convex, where a "longest line" might leave and then reenter target A. It's not clear to me from the current wording whether a target offset measurement line would be allowed to intersect additional edges of A beyond a second one. For example, consider a target which is ring-shaped - can a target offset line pass through the "hole" in the middle? I think different testers would give different answers with this proposal. I think this could be resolved by replacing "a second edge of A" with either "exactly one other edge of A" or "at least one other edge of A", depending what the intent of the language is. "At most one other edge of A" might also be an option, it helps clarify the triangle example.

Copy link
Contributor

@mbgower mbgower Jan 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbjorge it says "a second". Would "another" be less possible to misinterpet as a specific number for you? I think the reality is that we are never going to arrive at a phrase that someone could not misinterpret. That's what examples and clarification in the Understanding document can do. This is usable. Incidentally, in your donut example, yes, if it passes through 2 lines (the exterior and interior of one side of the donut) it would meet this definition. It would mean the user was assessing the furthest point of one target from another. That is the intent. The offset is about spacing, not about the size of the donut. What is the problem you see with that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbgower I agree that it's not realistic to come up with wording that could never be misinterpreted - my intent is to suggest a change to help make predictable misinterpretations less likely, not impossible, especially where there exists a fairly small change that achieves this. I think "a second edge" and "another edge" are equally good and agree that they're usable, but I think "at least one other edge" would be a bit harder to misinterpret, based on what I think you're describing as the intent.

I think the new wording that excludes overlapping targets from using the offset exception probably avoids most practical issues with shapes with holes in them; all the practical examples I can think of involving real cases using targets with holes in them come from other targets overlapping them. I think cases with pointed edges in different orientations like the triangle example @JAWS-test posted are more likely to come up in practice (shapes that are rotated slightly, star rating widgets, etc), though still not particularly common.

<p>Two targets are horizontally aligned if a horizontal line can be drawn that goes through both targets, but no vertical line can be drawn that goes through both targets. Two targets are vertically aligned if a vertical line can be drawn that goes through both targets, but no horizontal line can be drawn that goes through both targets.</p>
<p class="note">The target offset from A to B may be different than the target offset from B to A, if the sizes of these targets differ.</p>
</dd>