equal-access
equal-access copied to clipboard
[Rule] Improve style_hover_persistent margin testing
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
assumption is no change needed to Help and messages.
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.
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
@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.
revamp the hover rule to add additional conditions to check the margins from a trigger and the children of the trigger.
#1031 determined that no need to change the help content, so #1031 was closed.
@shunguoy what is next step for this issue?
@MHoov this is for review. the original reviewer is Tom, I will ask Josiah to review instead.
@shunguoy what is the expected behavior with the test link?
@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
No failure is preset in testing pages https://codesandbox.io/s/issue-686-p21zhd. Good to go