[Rules] Allow new window links to be satisfied by aria-describedby
Summary
I'm using the Chrome extension, and just implemented what I had hoped to be a fine solution for the following recommendation:
Users should be warned in advance if their input action will open a new window or otherwise change their context.
My implementation consists of the following markup:
<a aria-describedby="a11y-new-window" rel="noreferrer noopener" target="_blank" href=""></a>
Which maps to some accessible text globally.
<div hidden>
<span id="a11y-new-window">Opens in a new window</span>
</div>
Justification
If this method is acceptable, it'd help me knock out other important issues, without being distracted by issues that have been resolved.
This rule is prompted by this technique: https://www.w3.org/WAI/WCAG21/Techniques/general/G201
It's not tied to success criteria, so it's triggered as a recommendation, and not strictly required. Your proposal seems reasonable. I'll leave this issue open as a prompt for us to change WCAG20_A_TargetAndText to also look at the aria-describedby.
Testcase: https://codesandbox.io/s/issue-545-gno8z?file=/index.html