equalizedigital / accessibility-checker

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

Convert the text_small rule to JS check #633

Closed pattonwebz closed 1 month ago

pattonwebz commented 1 month ago

This PR converts the text_small rule from PHP to the js checker.

The PHP rule relied on complex CSS parsing, which could trip up or produce a false positive when CSS variables were used, the cascade order was unclear, or non-px units were in use.

The JS check uses actual computed styles to determine the exact rendered size of the text.

Closes: #630