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

WCAG 2.2 Pointer Target Spacing #1179

Merged
merged 32 commits into from Jul 21, 2020
Merged

WCAG 2.2 Pointer Target Spacing #1179

merged 32 commits into from Jul 21, 2020

Conversation

alastc
Copy link
Contributor

@alastc alastc commented Jun 25, 2020

This branch imports the Pointer Target Spacing success criteria from the google doc.

You can preview the:

The last survey, and last minutes.


Preview | Diff

@JAWS-test
Copy link

JAWS-test commented Jun 26, 2020

I have 3 questions, the answers to which, in my opinion, cannot be found in the Understandig at present and which could possibly be supplemented:

  • Exception enlarge: Would this also include browser zoom, which according to SC 1.4.4 has to be supported up to 200% anyway (if so, would targets with 22x22 px be sufficient if zoom up to 200% works)?
  • Is the SC only intended for mobile devices that are operated with fingers? Or also for desktop devices, where mouse or pen operation may also be difficult for people with tremor if the targets are too small?
  • Does this also apply to standard elements that are rendered by the browser? E.g. for <option> elements within a <select> dropdown list?

@alastc
Copy link
Contributor Author

alastc commented Jun 26, 2020

Hi @JAWS-test,

I think @detlevhfischer is tackling this, but in short:

  • The enlargement is to make it 44 CSS px, so zoom does not count towards that.
  • It is generally aimed at touch, although mouse users may benefit as well, if you click in the space between targets it doesn't automatically apply a heuristic to work out which link you meant to hit.
  • I assume it would apply to browser-default components, but it's an interesting point.

@alastc alastc added this to In progress in WCAG 2.2 Jun 26, 2020
@patrickhlauke
Copy link
Member

noting that from an actual practical/user point of view - assuming zoom is not suppressed - using browser zoom will make things physically larger for users making targets bigger - but that it's really more a last resort for users having to enlarge all content just to be able to comfortably operate a control (and otherwise, if browser zoom was an acceptable solution, it would essentially make target size and target spacing SCs irrelevant/always passable unless zoom was prevented or capped)

Addressing #1179 (comment)
The points are addressed in a new section, "Scope and applicability"
Also updating the second paragraph in section "Intent of Pointer Target Spacing" to make it easier to understand (or so I hope).
@JAWS-test
Copy link

What happens if elements overlap each other, e.g. a pop-up, a submenu, a context menu, autocomplete list entries or an open selection list is located before links in the page. Do the pop-up elements, menu or list items then also need to have sufficient distance from the links? It should be noted that in many cases the links can also be activated if they are partially hidden by the above mentioned elements. Only rarely is it necessary to close the hiding element first in order to activate the links below it

The requirement holds for all interactive elements that do not fall under the inline exception (including native elements like selects, buttons or inputs of type radio or checkbox).

I didn't mean the distance between select elements, but the distance between option elements within select. In Chrome these are 19 px high and have no spacing. So they would violate this. The same applies to all other browsers. Would the new SC really invalidate all select lists?

The requirement holds independently of the zoom factor of the page. This means that authors cannot meet it by claiming that the target will have enough spacing or sufficient size if the user zooms into the page

But what if the web developer does not rely on the browser zoom, but implements his own zoom function to meet the exception "Enlarge: A mechanism is available to change the CSS pixel size of all targets so that the width and height are each at least 44 CSS pixels"? The effect would be the same as with the browser zoom, but it would satisfy SC, right?

While the Success Criterion primarily helps touch users by ensuring that activation with the 'fat finger' will not accidentally trigger adjacent targets, it is also useful for mouse or pen users

That something is useful does not answer the question whether the new SC can only be violated on mobile devices, or even if I have a WCAG test where mobile devices are explicitly excluded from the test

@patrickhlauke
Copy link
Member

the SC isn't meant to be explicitly about touch, but the current wording is still riddled with talk of touch. it applies, just like target size SC, to all possible pointer interactions.

Took out the bit that the SC applies to the spacing between native elements (I think it that is clear), but addressing @JAWS-test's comments, added an exception for the spacing of targets _inside_ unstyled native elements (i.e. where the vertical spacing of options in a select is determined by the default browser behaviour).
Following comments by @patrickhlauke I removed mention of touch in two places.
Added a third example (row of buttons with sufficient spacing above and below).
Edited the figcation / legend of thee image with the three differnet positionings of the magnify icon over a profile image, reduced length of the alt attribute.
@patrickhlauke
Copy link
Member

as pedantic as it is, there are still many instances of "criteria" (plural) where it should be "criterion" (singular). started commenting on them individually, but for brevity, just worth doing a quick once-over.

@detlevhfischer
Copy link
Contributor

@JAWS-test

What happens if elements overlap each other, e.g. a pop-up, a submenu, a context menu, autocomplete list entries or an open selection list is located before links in the page. Do the pop-up elements, menu or list items then also need to have sufficient distance from the links?

I think the SC should certainly apply to targets in additional layers, including targets below that are possibly overlapped, but that that target spacing of elements on the page below should be assessed in the "default state", i.e., without any dynamic content opened on top of that default state. Not quite sure how to make this clear, and whether it is enough to add this to the understanding text and leave the SC text unchanged.

I didn't mean the distance between select elements, but the distance between option elements within select. In Chrome these are 19 px high and have no spacing. So they would violate this. The same applies to all other browsers. Would the new SC really invalidate all select lists?

Good point. I think it makes sense to add an exception for targets inside unstyled native elements (e.g., lists of select options). I would assume once the author changes these, the target spacing requirement would apply. I have changed the understanding text to include that exception.

But what if the web developer does not rely on the browser zoom, but implements his own zoom function to meet the exception "Enlarge: A mechanism is available to change the CSS pixel size of all targets so that the width and height are each at least 44 CSS pixels"? The effect would be the same as with the browser zoom, but it would satisfy SC, right?

Yes, IMO.

@patrickhlauke Changed criteria to criterion where needed
Changed some of the figaption text to make them easier to understand
Changed an odd sentence above the profile images /maginfication icons illustiration
Changed the paragraph above h2 Benefits (pointing out the benefits of general adaptability of size/spacing)
Added a third example in second position (row of buttons where enough vertical spacing is present to meet SC)
@detlevhfischer
Copy link
Contributor

I note that the exception

Enlarge: A mechanism is available to change the CSS pixel size of all targets so that the width and height are each at least 44 CSS pixels;

is really too specific: it could also be enough to change the spacing without increasing the target size, or change both, so we need something like

Enlarge: A mechanism is available to change the CSS pixel size of targets and/or spacing between targets so that the width and height of both target dimension and spacing combined are each at least 44 CSS pixels;

I improved the ficaption legends of the illustration, some were hard to understand.
I improved the image legends / figcaption texts, and removed the heading Scope and applicability, would have needed a further subheading to separate what are essentialy examples with illustrations. It is odd that there is an actual section Examples further down whithout illustrations, but I do not want to carry through a complete overhaul of the Understanding page at this point. I think it would generally be benefitial to have more subheadings in the longier understanding pages, not just Intent / Benefits / examples, but I am not sure how flexible we are in this respect...
@alastc
Copy link
Contributor Author

alastc commented Jul 2, 2020

Thanks for all the updates Detlev.

I'm a little concerned by adding an exception to the understanding document, I think we need to make that explicit in the SC text if we do, e.g:

User agent: The size of the target is controlled by the user agent and is not modified by the author.

Does that do the job? If so, we'll put back to the group.

@detlevhfischer
Copy link
Contributor

detlevhfischer commented Jul 4, 2020 via email

@alastc
Copy link
Contributor Author

alastc commented Jul 14, 2020

Just noting that this PR was discussed today and no issues were raised with the changes. This will go out for CFC shortly.

understanding/22/pointer-target-spacing.html Outdated Show resolved Hide resolved
understanding/22/pointer-target-spacing.html Outdated Show resolved Hide resolved
understanding/22/pointer-target-spacing.html Outdated Show resolved Hide resolved
understanding/22/pointer-target-spacing.html Outdated Show resolved Hide resolved
understanding/22/pointer-target-spacing.html Show resolved Hide resolved
techniques/css/target-padding.html Outdated Show resolved Hide resolved
Changed to "or must be placed at the edge"
Accepted "to make sure that there is sufficient adjacent spacing in each dimension"
Changed to "and a magnifying glass"
Changed "excempted" -> exempted
Slightly changed wording:  "Having targets with sufficient target spacing can help all users who may have difficulty in confidently targeting or operating small controls. Users who benefit include, but are not limited to:"
detlevhfischer and others added 2 commits July 16, 2020 19:10
Updated name to "Using min-height and min-width to ensure sufficient target spacing"
@alastc alastc merged commit 4a20a35 into master Jul 21, 2020
WCAG 2.2 automation moved this from In progress to Prepare for Editor's draft Jul 21, 2020
@alastc alastc deleted the wcag22-pointer-target-spacing branch July 21, 2020 23:31
@alastc alastc moved this from Prepare for Editor's draft to Done in WCAG 2.2 Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
WCAG 2.2
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants