If you call the login page with a screenreader and click into the login field, the screenreader reports that the input is invalid.
This is because the field is required and has not yet received any input. This can be quite tedious for limited people. To avoid this error, it is best to give the required field the value aria-invalid="false" before the first input.
Labels |
Added:
?
|
Yes, and it's better than doing nothing about it.
Sorry but you didnt read that post.
using aria-invalid on its own is not a solution as you still want/need the ability to validate the field
When its time to mark a form control as invalid, the attribute’s value should be set to “true”. Ideally, a control should be set to invalid only after a required control has been focused, and then blurred, without a proper string being entered.
Labels |
Added:
J4 Issue
?
|
Title |
|
Status | New | ⇒ | Discussion |
I have been looking at this again and I can see I was confusing this with another issue
You correctly quoted
This is because the field is required and has not yet received any input. This can be quite tedious for limited people. To avoid this error, it is best to give the required field the value aria-invalid="false" before the first input.
My apologies as I did not appreciate that the aria-invalid was being added and changed by js. Looking at the code in media\system\js\fields\validate.es6.js
it looks like the intention of the code is to do exactly what you say BUT it is being triggered before the control has been focussed - hence the bug that you correctly report.
Sorry I don't really understand enough of javascript to resolve it myself but I am sure someone can.
Once again my apologies for getting confused on this issue
Labels |
Added:
No Code Attached Yet
a11y
bug
Removed: ? |
This is a well known screen reader issue and not specific to joomla
Your suggestion only partially solves it
https://developer.paciellogroup.com/blog/2019/02/required-attribute-requirements/