equal-access icon indicating copy to clipboard operation
equal-access copied to clipboard

[Rule] Improve style_hover_persistent margin testing

Open mbgower opened this issue 3 years ago • 2 comments

Extension to #661 work. During QA with @drjoho we discovered that the margin causes a failure even if the element displayed on hover is a child of the trigger element. Our current logic only checks the trigger for margin, so the rules should be revamped to check for this additional way to fail Content on Hover or Focus.

  • [ ] revamp the rule logic to check for margin on both target and displayed element
  • [ ] test changes
  • [ ] check if changes to help or messaging are required

See testcase: https://codesandbox.io/s/issue-686-p21zhd

mbgower avatar Feb 14 '22 13:02 mbgower

assumption is no change needed to Help and messages.

philljenkins avatar May 26 '22 16:05 philljenkins

per team discussion, the rule logic needs to rework based on the bounding boxes: the bounding boxes of the triggering element and the first adjacent element should overlap or in touch without separation; the bounding boxes of the adjacent child elements should overlap or in touch without separation. The rule help needs to be updated accordingly.

shunguoy avatar Aug 05 '22 15:08 shunguoy

work items:

  • [x] revamp rule logic to use bounding boxes, rather than margin
  • [ ] create test cases for the text that are in different positions (up, down. left, right with touch/overlaps and separation)
  • [x] help review and update if needed

shunguoy avatar Aug 19 '22 14:08 shunguoy

@tombrunet @drjoho the approach to use bounding boxes for the hover might not work, because the bounds are 0s for invisible elements that are only shown on hover.

shunguoy avatar Aug 23 '22 15:08 shunguoy

revamp the hover rule to add additional conditions to check the margins from a trigger and the children of the trigger.

shunguoy avatar Aug 24 '22 15:08 shunguoy

#1031 determined that no need to change the help content, so #1031 was closed.

philljenkins avatar Aug 24 '22 23:08 philljenkins

@shunguoy what is next step for this issue?

MHoov avatar Sep 01 '22 12:09 MHoov

@MHoov this is for review. the original reviewer is Tom, I will ask Josiah to review instead.

shunguoy avatar Sep 01 '22 15:09 shunguoy

@shunguoy what is the expected behavior with the test link? Screen Shot 2022-09-07 at 8 57 29 PM

ErickRenteria avatar Sep 08 '22 01:09 ErickRenteria

@eirckr expected behavior is if a margin exists regardless of the element, the hover text doesn't stay, and vice versa. test cases: https://github.com/IBMa/equal-access/pull/1053/files#diff-99e3f61767aad6ff950ff083964a51d43c14da23d792c7b4eafc36d06939e5a7.
https://github.com/IBMa/equal-access/pull/1053/files#diff-e6c4339e6dafbe2c469386655b731f15d6288611647d3adfdfbaf80d74630604

shunguoy avatar Sep 08 '22 14:09 shunguoy

No failure is preset in testing pages https://codesandbox.io/s/issue-686-p21zhd. Good to go

ErickRenteria avatar Sep 12 '22 19:09 ErickRenteria