Task #104797
openUse disabled state instead of disabled css class
100%
Description
This epic is to collect dedicated issues to fix misusages of the css class `.disabled` where `:disabled` state should be used.
Example:
<button type="button" class="disabled">Some Button</button>
<button type="button" disabled>Some Button</button>
Updated by Benjamin Kott 3 months ago
- Tracker changed from Epic to Task
- TYPO3 Version set to 13
Updated by Ayke Halder 3 months ago
- Related to Task #104703: A11y: Really disable buttons with 'class="disabled"' for data-multi-record-selection…-action added
Updated by Ayke Halder 3 months ago
Lina Wolf wrote in #note-2:
What about code like the following:
[...]Shouldn't this be a disabled button instead?
Found in typo3/sysext/form/Resources/Private/Templates/Backend/FormManager/Index.html
In general the user interface should not change for screen-reader announcements.
If there is a button in the UI, then there should still be a button there if it gets disabled (screenreader reads: "button disabled").
There is a special case for paginations:
[1][…][7][8][9][10][11][…][33]
Here I would say: no button for […]
as this never becomes clickable.
E.g. see "84782: [BUGFIX] Make live search pagination accessible by keyboard" | https://review.typo3.org/c/Packages/TYPO3.CMS/+/84782
<span role="presentation" class="page-item"><span aria-hidden="true" class="page-link disabled">…</span></span>
If there is a case where […]
is clickable, it must be a button with a proper (hidden) labeling:
Also see https://forge.typo3.org/issues/104796#note-4
<button type="button"><span aria-hidden="true">…</span><span class="visually-hidden">SOME LABEL</span></button>
<button type="button" aria-label="SOME LABEL"><span aria-hidden="true">…</span></button>
By using aria-label=""
you can actually drop the aria-hidden="true"
as the whole button-read-out is replaced by the given label and no text from inside the <button>
-tag is announced anymore:
<button type="button" aria-label="SOME LABEL">…</button>
Updated by Ayke Halder 3 months ago
- Related to Task #104817: Really disable recycler search-submit-button instead of using class="disabled" added
Updated by Ayke Halder 3 months ago
- Related to Task #104820: Really disable workspace review record-action-buttons instead of using span with class="disabled" added
Updated by Ayke Halder 2 months ago
- Related to Task #104885: Really disable workspaces search-submit-button instead of using class="disabled" added
Updated by Benni Mack about 1 month ago
- Target version changed from 13 LTS to Candidate for Major Version