equalizedigital / accessibility-checker

GNU General Public License v2.0
15 stars 8 forks source link

Prevent underlined_text from checking underlined elements that are inside links #689

Closed pattonwebz closed 1 week ago

pattonwebz commented 1 week ago

This PR adds some checks in the 'matches' value of the underlined_text rule definition. The check are on the parent node (as high as 3 levels) for anchors and if it finds one won't check to flag an underline since flagging them if inside anchors is a false positive.

Closes: #688

SteveJonesDev commented 1 week ago

@pattonwebz, should this pass or fail?

<a href="https://example.com"><u>This is a link with underline</u></a>

pattonwebz commented 1 week ago

@pattonwebz, should this pass or fail?

<a href="https://example.com"><u>This is a link with underline</u></a>

Probably fail, all u tags should fail