Ramonda

aria-that-contradicts-the-tag

This fails the run. Where it is wrong about your code, // ramonda-check-ignore <reason> on the line says so, and the reason is printed on every run.

Reported when an aria-* is written false beside the HTML attribute that says the opposite.

The HTML attribute is doing its job: the form will refuse to submit, the button will not take a click. The aria-* beside it overrides what a screen reader is TOLD about that — so the reader hears that the field is optional and then cannot submit, or that the button is available and then nothing happens when they press it.

That is worse than saying nothing at all. A control with nothing said about it leaves a reader to find out by trying; one that says the opposite of what it does sends them looking for a fault somewhere else on the page.

Delete the aria-*. The HTML attribute already sets it — required means aria-required, disabled means aria-disabled, and writing either again can only disagree with it.

Where the state really does move, bind BOTH to the same expression, or bind neither and let the HTML attribute alone carry it:

<button type="button" disabled={busy}>Save</button>

Next