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

Add target size enhanced rule #1919

Draft
wants to merge 46 commits into
base: develop
Choose a base branch
from
Draft

Conversation

WilcoFiers
Copy link
Member

Need for Call for Review: 2 weeks


How to Review And Approve

  • Go to the “Files changed” tab
  • Here you will have the option to leave comments on different lines.
  • Once the review is completed, find the “Review changes” button in the top right, select “Approve” (if you are really confident in the rule) or "Request changes" and click “Submit review”.
  • Make sure to also review the proposed Call for Review period. In case of disagreement, the longer period wins.

@dd8
Copy link
Collaborator

dd8 commented Oct 12, 2023

The lack of a CSS hit testing spec is listed as an open issue:
w3c/csswg-drafts#2325

Hit testing doesn't seem fully interoperable. - though things may have improved since this was written:
https://lists.w3.org/Archives/Public/www-style/2010Aug/0407.html

There's a W3 Wiki article here detailing the hit testing in IE:
https://www.w3.org/wiki/Hit_Testing

Here's the code for handling touch events in Chromium:
https://github.com/chromium/chromium/blob/be0d3937d6ccc1a4e0d27315d2e827151850d3fa/android_webview/renderer/aw_render_frame_ext.cc#L233
(so Chrome actually does hit testing on rects, rather than the circle used in WCAG 2.2 2.5.8)

Edit: elements with opacity:0 are clickable. You can try this out with the "back to top" link at bottom right of https://www.w3.org/WAI/ (it sets opacity:0 when scroll thumb is at top of document - but you can still click on it in Chrome/FF/Safari)

Edit: SVG strokes/fills/markers are only clickable if they have a color specified, so the borders of the following rect are clickable, but the middle isn't due to fill=none:

    <svg height="400px" width="400px" viewBox="-5 -5 30 30">
    <a href="https://example.com"><rect x="0" y="0" width="20" height="10" stroke="black" stroke-width="3" fill="none"></rect></a>
    </svg>

In SVG 2.0 this is controlled by the pointer-events property, but it's unclear if any browsers have implemented this:
https://www.w3.org/TR/SVG2/interact.html#PointerEventsProperty

Jym77 and others added 16 commits October 13, 2023 13:04
* Add new letter-spacing rule and deprecate old one

* Add new word-spacing rule and deprecate old one

* Clean up assumptions

* Clean up

* Clean up

* Add new line-height rule and deprecate old one

* Replace old letter spacing version rather than deprecating it

* Replace old line height version rather than deprecating it

* Replace old word spacing version rather than deprecating it

* Target text nodes

* Improve background note

* Apply suggestion from review

* Clean up

* Target text nodes rather than their parents

* Target text nodes rather than their parents

* Add missing reference

* Update example

* Apply to parent of text nodes, not text nodes

* Apply suggestions from code review

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>

* Typos

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>

* Typos

---------

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>
…1994)

* Explicit meaning of 'has'

* Improve expectation and examples

* Typo

* Improve algorithm description

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>

* Rephrase expectations

* Streamline Applicability

* Typo

* Simplify expectations

---------

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>
Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>
Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>
* Fix markup issue in Iframe has name rule

* Update _rules/iframe-non-empty-accessible-name-cae760.md
* Stop linking to proposed rules

* Apply suggestions from code review

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>

---------

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>
…2125)

* Update programmatically-determined-link-context.md

* Update iframe-not-focusable-has-no-interactive-content-akn7bn.md

* Update programmatically-determined-link-context.md

* Update iframe-not-focusable-has-no-interactive-content-akn7bn.md

* Create modal-dialog

* Rename modal-dialog to modal-dialog.md

* Update iframe-not-focusable-has-no-interactive-content-akn7bn.md

* Update iframe-not-focusable-has-no-interactive-content-akn7bn.md

* Apply suggestions from code review

Co-authored-by: Dan Tripp <113939352+dan-tripp-siteimprove@users.noreply.github.com>

* Update iframe-not-focusable-has-no-interactive-content-akn7bn.md

* Update and rename modal-dialog.md to inert.md

* Update iframe-not-focusable-has-no-interactive-content-akn7bn.md

* Update iframe-not-focusable-has-no-interactive-content-akn7bn.md

* Update spelling-ignore.yml

* Update iframe-not-focusable-has-no-interactive-content-akn7bn.md

* Update inert.md

* Apply suggestions from code review

Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>
Co-authored-by: Dan Tripp <113939352+dan-tripp-siteimprove@users.noreply.github.com>

* Update iframe-not-focusable-has-no-interactive-content-akn7bn.md

* Update inert.md

* Apply suggestions from code review

Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>

* AGWG Updates (#2067)

* Add (alt="") for clarity on empty alt

* Resolve focus visible feedback

* Tweak contrast rules

* Tweak page title descriptive

* Fix tests

* Apply suggestions from code review

Co-authored-by: Trevor R. Bostic <32486143+tbostic32@users.noreply.github.com>

---------

Co-authored-by: Trevor R. Bostic <32486143+tbostic32@users.noreply.github.com>

* [cae760] Frame has non-empty accessible name (#2034)

* First pass in response to Feb 16 TF meeting

* typo

* Update _rules/iframe-non-empty-accessible-name-cae760.md

Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>

* Update _rules/iframe-non-empty-accessible-name-cae760.md

Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>

* Update _rules/iframe-non-empty-accessible-name-cae760.md

Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>

* Update _rules/iframe-non-empty-accessible-name-cae760.md

Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>

* Update _rules/iframe-non-empty-accessible-name-cae760.md

Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>

* Move note about frame to background

* Set height for frame

* Test wants alphabetical contributors

* Update _rules/iframe-non-empty-accessible-name-cae760.md

Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

* Update _rules/iframe-non-empty-accessible-name-cae760.md

Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

* Update _rules/iframe-non-empty-accessible-name-cae760.md

Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

* Move note to background

---------

Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>
Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

* Updating glossary definition. (#2069)

* Bump yaml and zx (#2056)

* Bump yaml and zx

Bumps [yaml](https://github.com/eemeli/yaml) to 2.2.2 and updates ancestor dependency [zx](https://github.com/google/zx). These dependencies need to be updated together.


Updates `yaml` from 1.10.2 to 2.2.2
- [Release notes](https://github.com/eemeli/yaml/releases)
- [Commits](eemeli/yaml@v1.10.2...v2.2.2)

Updates `zx` from 5.3.0 to 7.2.1
- [Release notes](https://github.com/google/zx/releases)
- [Commits](google/zx@5.3.0...7.2.1)

---
updated-dependencies:
- dependency-name: yaml
  dependency-type: indirect
- dependency-name: zx
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Trigger CLA?

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

* new rule: ARIA required ID references exist (#2041)

* new rule: ARIA required ID references exist

* Address review comments

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>

* Apply suggestions from code review

Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

* Apply suggestions from code review

Co-authored-by: Tom Brunet <thbrunet@us.ibm.com>
Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

* Update _rules/aria-required-id-references-in6db8.md

* Apply suggestions from code review

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>

---------

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>
Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>
Co-authored-by: Tom Brunet <thbrunet@us.ibm.com>

* scrollable element: clarify the title (#2083)

* UpdateTableHeaderRule (#2074)

* UpdateTableHeaderRule

* Update table-header-cell-has-assigned-cells-d0f69e.md

* trigger test

* Update _rules/table-header-cell-has-assigned-cells-d0f69e.md

Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

---------

Co-authored-by: Wilco Fiers <wilco.fiers@deque.com>
Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

* Adds apostrophe to mark the possessive form (#2080)

Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>

* Focus visible rule: Fix typo (#2082)

* Contrast rules: Tweak background text (#2090)

* Tweak name / description of Scrollable element keyboard (#2092)

* Deprecate HTML page lang and xml:lang attributes have matching values (#2086)

* Deprecate HTML page lang and xml:lang attributes have matching values

* Apply suggestions from code review

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>

---------

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>

* Rephrase Applicability (#2079)

* Rename file (#2078)

* Move secondary requirement texts out of the background (#2060)

* Move secondary requirement texts out of the background

* Apply suggestions from code review

* fix test

* Fix failing test

* Secondary reqs on ARIA rules

* Update all secondary requirements

* Typos

* Fix failing tests

* Update _rules/link-non-empty-accessible-name-c487ae.md

Co-authored-by: Trevor R. Bostic <32486143+tbostic32@users.noreply.github.com>

* Tweaked the language some more

* Update rule design info for secondary requirements

* Fix tests

* Apply suggestions from code review

Co-authored-by: Kathy Eng <kengdoj@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

---------

Co-authored-by: Trevor R. Bostic <32486143+tbostic32@users.noreply.github.com>
Co-authored-by: Kathy Eng <kengdoj@users.noreply.github.com>
Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

* fix test on secondary requirements (#2102)

* fix test on secondary requirements

* More assertions

* Update _rules/aria-required-id-references-in6db8.md

Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

---------

Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

* Update dependencies (including act-tools) (#2103)

* fix test-assets not getting built right (#2104)

* Update element-lang-valid-de46e4.md (#2100)

Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

* fix the approve-rule action (#2105)

* Remove outdated accsupport note (#2111)

* "Element with lang attribute has valid language tag" [de46e4]: Updated Failed Examples 4 and 5 to reflect Applicability (#2094)

* Update element-lang-valid-de46e4.md

Updated Failed examples 4 and 5 to reflect applicability

* Apply suggestions from code review

Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

* Update _rules/element-lang-valid-de46e4.md

Co-authored-by: Dan Tripp <113939352+dan-tripp-siteimprove@users.noreply.github.com>

---------

Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>
Co-authored-by: Dan Tripp <113939352+dan-tripp-siteimprove@users.noreply.github.com>
Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>

* Text spacing rewrite (#1923)

* Add new letter-spacing rule and deprecate old one

* Add new word-spacing rule and deprecate old one

* Clean up assumptions

* Clean up

* Clean up

* Add new line-height rule and deprecate old one

* Replace old letter spacing version rather than deprecating it

* Replace old line height version rather than deprecating it

* Replace old word spacing version rather than deprecating it

* Target text nodes

* Improve background note

* Apply suggestion from review

* Clean up

* Target text nodes rather than their parents

* Target text nodes rather than their parents

* Add missing reference

* Update example

* Apply to parent of text nodes, not text nodes

* Apply suggestions from code review

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>

* Typos

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>

* Typos

---------

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>

* "Meta viewport allows for zoom" (b4f0c3): Explicit meaning of 'has' (#1994)

* Explicit meaning of 'has'

* Improve expectation and examples

* Typo

* Improve algorithm description

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>

* Rephrase expectations

* Streamline Applicability

* Typo

* Simplify expectations

---------

Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>

* Map Empty-heading rule to ARIA instead of WCAG (#2120)

Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

* Deprecate 4.1.1 rules (#2117)

Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: giacomo-petri <106394951+giacomo-petri@users.noreply.github.com>
Co-authored-by: Carlos Duarte <caduarte@campus.ul.pt>
Co-authored-by: Dan Tripp <113939352+dan-tripp-siteimprove@users.noreply.github.com>
Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>
Co-authored-by: Trevor R. Bostic <32486143+tbostic32@users.noreply.github.com>
Co-authored-by: Tom Brunet <thbrunet@us.ibm.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: HelenBurge <41951878+HelenBurge@users.noreply.github.com>
Co-authored-by: Wilco Fiers <wilco.fiers@deque.com>
Co-authored-by: Daniel Montalvo <49305434+daniel-montalvo@users.noreply.github.com>
Co-authored-by: Kathy Eng <kengdoj@users.noreply.github.com>
@Jym77
Copy link
Collaborator

Jym77 commented Nov 23, 2023

@dd8 Been trying another direction with the rule. See also https://w3ccommunity.slack.com/archives/C01167KLA73/p1700745811381929 for details.
I'd appreciate if you could get a look at the current state and test cases. You have both the technical expertise and tool insight to figure out whether this is going anywhere.

@Jym77 Jym77 requested a review from dd8 December 21, 2023 11:59
@Jym77 Jym77 added Rule Use this label for a new rule that does not exist already reviewers wanted labels Jan 18, 2024
- the element is a [semantic `widget`][semantic role]; and
- the element is [focusable][]; and
- the element's [border box][] intersects the viewport; and
- the element's [border box][] is not entirely covered by the [border boxes][] of elements with greater `z-index` and `pointer-events: auto` CSS properties.
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure exactly what you mean 🤔

Is it about elements "behind" the modal being blocked by it when it's opened (even if they are visible)?
I think that this is covered because in that case, their "clickable area" would be empty (the blocked elements are never topmost target, until the modal is closed and stops blocking them).

@Jym77
Copy link
Collaborator

Jym77 commented Feb 15, 2024

I've updated the rule with comments for review, and cleaned it a bit. It now starts to look like an actual rule 🎉

  • Ultimately, I've ditched the "weird shape" exceptions. These are only really needed for the 2.5.8 rule (due to distance), and there was no real need to restrict this rule because of that. I made sure that the examples do not rely on the weird shape (i.e., no 50×50 button clipped to 40×40), so that automated tools who rely on border boxes or getBoundingClientRect can still claim a consistent implementation (and added a note to explain that).
  • Also simplified a bit some of the definitions…

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Carlos Duarte seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Jym77 Jym77 marked this pull request as ready for review February 15, 2024 15:35
@Jym77 Jym77 marked this pull request as draft April 3, 2024 12:05
@Jym77 Jym77 mentioned this pull request Apr 3, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reviewers wanted Rule Use this label for a new rule that does not exist already
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants