7
0
mirror of https://github.com/marado/RNID.git synced 2025-01-03 01:17:34 +00:00

gov.pt: better WCAG validation of the website

This commit is contained in:
Marcos Marado 2019-04-16 17:31:14 +01:00
parent 2664084718
commit fa3cca2eeb

View File

@ -5,11 +5,13 @@
# webaim.org - API's not gratis
# While we don't have a validator on request, let's find out if a known violation still exists
## 20/05/2018: - several images without an alt attribute:
## 03/04/2019: - if the alt attribute exists but is empty, it's still an WCAG violation...
## several images without an alt attribute:
## if the alt attribute exists but is empty, it's still an WCAG violation...
## Empty links are also WCAG violations
fails="$(wget https://www.portugal.gov.pt -o /dev/null -O - | grep "<img" |grep -v alt|wc -l)"
fails=$((fails + $(wget https://www.portugal.gov.pt -o /dev/null -O - | grep "<img" |grep -c alt=\'\')))
fails=$((fails + $(wget https://www.portugal.gov.pt -o /dev/null -O - | hxnormalize -x -l 10000|hxselect a -c -s'\n'|grep -c ^$)))
if [ "$fails" -eq "0" ]; then
echo "gov.pt: incumprimento pode já não existir";