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

2.5.8 Target Size "overlapping any other target" does not work #3050

Closed
WilcoFiers opened this issue Feb 21, 2023 · 2 comments · Fixed by #3123
Closed

2.5.8 Target Size "overlapping any other target" does not work #3050

WilcoFiers opened this issue Feb 21, 2023 · 2 comments · Fixed by #3123

Comments

@WilcoFiers
Copy link
Contributor

The latest CR draft introduced this wording in 2.5.8 Target Size:

Spacing: The target does not overlap any other target

I think this wording mixes "targets" and "user interface components". While UICs can often be stacked, a target is simply whatever region of the display responds to a pointer event. If the UIC is partially obscured, it reduces the target size, it isn't "overlapped". That's important, because we don't want people claiming a target passes because its 24x24 in size, while most of it is obscured.

The reason "overlapping" was added I think, was to address my H4 example, which feels like it shouldn't pass, but in the previous definition it did:
https://codepen.io/wilcofiers/full/abZxPow

Screenshot of codepen with overlapping elements

The problem though, even if we ignore that it's the UICs that overlap, not the target, is that the element that passes but shouldn't is not actually the element that is "overlapping". The element is "overlapped", it has things on top of it, but it isn't overlapping other UICs.

So the problem that this change in wording tried to solve isn't solved at all.

@alastc
Copy link
Contributor

alastc commented Feb 21, 2023

even if we ignore that it's the UICs that overlap, not the target, is that the element that passes but shouldn't is not actually the element that is "overlapping". The element is "overlapped", it has things on top of it, but it isn't overlapping other UICs.

When we discussed it, I think the idea was that anything overlapping / overlapped would not be covered by the exception. The principle being that if they overlap, there is no spacing.

So for each of the H1-4 targets, none would use the exception. The targets in H4 foreground would pass (assuming more than 24px), but not the background one.

I see the issue of 'overlapping' not really being a thing for our definition of target.

I don't think switching to UICs would work, and it would open up a lot of other possibilities that we haven't considered.

The most likely alternatives are:

  1. Compensate in the understanding.
  2. Switch it to something like: "The target does not touch any other target and has a target offset of at least 24 CSS pixels to every adjacent target;"

However, as (I think Dan) previously pointed out, that means we couldn't use the exception to allow for adjacent buttons with rounded corners.

I know we looked at using circular measure before, and there were issues with that approach. From memory, I think it was mostly for the exception.

It would be a normative change, but what about:

  • Using a circular measure for the primary size measure.
  • Using adjacent / touching for the exception (instead of overlap).

@alastc
Copy link
Contributor

alastc commented Mar 3, 2023

Suggestion from the WCAG 2.x meeting:

  • Update the spacing exception to "Spacing: Targets are spaced such that if 24 CSS pixel diameter circles are centered on each target, none of the circles intersect another circle or target."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants