Redundant aria attributes only detected when native boolean attribute has a value
The message 'Attribute aria-readonly must not be specified on elements that have attribute readonly' only fires for the third example here:
<input type='text' readonly aria-readonly='false' />
<input type='text' readonly='' aria-readonly='false' />
<input type='text' readonly='readonly' aria-readonly='false' />
The message 'Attribute aria-disabled must not be specified on elements that have attribute disabled' only fires for the third example here:
<input type='text' disabled aria-disabled='false' />
<input type='text' disabled='' aria-disabled='false' />
<input type='text' disabled='disabled' aria-disabled='false' />
The same problem happens with
<input type='text' required aria-required='false' />
<input type='text' required='' aria-required='false' />
<input type='text' required='required' aria-required='false' />
<div hidden aria-hidden='false'></div>
<div hidden='' aria-hidden='false'></div>
<div hidden='hidden' aria-hidden='false'></div>
We can submit some test cases as a WPT PR - would that be useful?
I had a look at the code in Assertions.java - I think the problem is
.1762 boolean isEmptyAtt = "".equals(atts.getValue(i));
This is set for all empty attributes - including native ones like disabled and readonly - but should probably only be set for empty aria-* attributes (and perhaps renamed isEmptyAriaAtt).
https://github.com/validator/validator/commit/1eac20b7e5c186a3172fadd2a246bbb160e17411