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 content vs intersecting #3896

Open
jamieherrera opened this issue Jun 5, 2024 · 2 comments
Open

2.5.8 Target Size overlapping content vs intersecting #3896

jamieherrera opened this issue Jun 5, 2024 · 2 comments

Comments

@jamieherrera
Copy link

I get that a smaller target surrounded by/ fully overlapping a larger target needs to be at least 24 px in size to pass, OR with the spacing exception, be at least 24 px from the intersecting edge of a larger target (Figure 9 in the Understanding doc), which according to the image, can include touching, or even sharing an edge pixel.

It's unclear whether items that are intersecting a larger target (ie goes beyond the shared pixel) AND at least 24 px pass or fail? In other words, can interactive items intersect, no problem, if both items are at least 24 px?

I'm inclined to say pass because the target is at least 24 px and that's the SC. End of story. I think what throws me is that the logic for the 16 px scenario uses the measurement tool of a 24 px diameter circle as the intersecting item, and highlights intersecting as a bad thing.

Scenario in question:

"In the top row, the small target overlaps - or, to be more technically accurate, clips - the large target. The small target itself has a size of 24 by 24 CSS pixels, so passes. In the second row, we see that if the second target is any smaller – in this case 16 by 16 CSS pixels – it fails the criterion, as the circle with a 24 CSS pixel diameter we draw over the small target will intersect the large target itself."
https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum

@alastc
Copy link
Contributor

alastc commented Jun 18, 2024

or even sharing an edge pixel

I don't think a target can share a pixel with another target. In HTML terms, one of them will be over the other, and will take the event. Effectively there is not an overlap, as you say, one target clips another so one of them shrinks compared to what it would be if they didn't overlap.

The definition of a target outlines this.

I think what throws me is that the logic for the 16 px scenario uses the measurement tool of a 24 px diameter circle as the intersecting item

Using the circle was what (after a lot of discussion) the group came to as the best method for the exception. I.e. the primary requirement is for a minimum of 24px, but with spacing around a target having a 24px circle matches the use-case (a finger) most closely.

@alastc
Copy link
Contributor

alastc commented Jan 10, 2025

Updating my comment to be a Draft Working Group Response:


or even sharing an edge pixel

A target cannot share a pixel with another target. In HTML terms, one of them will be over the other, and will take the event. Effectively there is not an overlap, as you say, one target clips another so one of them shrinks compared to what it would be if they didn't overlap.

The definition of a target outlines this.

I think what throws me is that the logic for the 16 px scenario uses the measurement tool of a 24 px diameter circle as the intersecting item

Using the circle was what (after a lot of discussion) the group came to as the best method for the exception. I.e. the primary requirement is for a minimum of 24px, but with spacing around a target having a 24px circle matches the use-case (a finger) most closely.

The intersection in figure 9 is bad because it means the target (and/or spacing) is not sufficient to meet the criterion.

If you had a 24px square target that overlaps a larger one, there are no "shared" pixels for the targets even if they visually overlap. For each pixel, one of the targets will be activated, not both. Therefore each pixel contributes to one of the targets for the purpose of calculating the size.

@patrickhlauke patrickhlauke self-assigned this Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants