Thanks @brianteeman for this finding.
Disabled buttons with listcheck=true such as the Actions button in our backend list views are not WCAG 2.1.
In this case we set the button to disabled until an item is selected.
The a11y issue with this is that it makes the button invisible to AT so the user will not even know it exists - it has no focus at all.
The alternative is to use aria-disabled instead.
That keeps the button as focussable and announces that the button is disabled (and optionaly what you have to do to make it enabled).
Also the disabled button is focussable and accessible
Not accessible
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
a11y
|
Labels |
Added:
bug
|
Sorry - looking at this again and I have no idea where the code I had is and my js skills are not good enough to do anything more than a hack
The changes need to be made in media\system\js\joomla-toolbar-button.js
So that instead of adding "disabled"
we set aria-disabled="true"
Then we have a choice to either use js to disable clicking on a button with aria-disabled or we allow clicks and have a message "you must select one or more items" a bit like we do in content versions
I have most of the PR ready for this. It is fully b/c
Note that in addition to what @chmst said above we have to programmatically remove the functionality from the button as aria-disabled doesnt actually do that.