Task #104796
open
Use buttons instead of anchors for javascript handled actions
Added by Benjamin Kott about 2 months ago.
Updated 16 days ago.
Category:
Backend User Interface
Estimated time:
(Total: 0.00 h)
Description
This epic is to collect dedicated issues to fix misusages of anchors (<a>) where buttons should be used.
Example: This is an anchor tag that should really be a button and needs migration.
<a href="#" onClick="foo();">Some title</a>
<button type="button" onClick="foo();">Some title</button>
Note: We do not use onClick function calls, this is just an example.
The look and feel should be kept as is for now.
- Related to Task #104798: Anchors are used instead of buttons to collapse panels added
- Tracker changed from Epic to Task
- TYPO3 Version set to 13
- Related to Bug #103583: Improve accessibility of elements with low opacity on focus by keyboard added
Labeling is another point we might try to fix here for buttons that consist of an icon only:
<button type="button">
SOME_ICON_CODE
<span class="visually-hidden">SOME LABEL</span>
</button>
<button type="button" aria-label="SOME LABEL">
SOME_ICON_CODE
</button>
Ayke Halder wrote in #note-4:
Labeling is another point we might try to fix here for buttons that consist of an icon only:
[...]
[...]
We only want to use aria-label when no other way is possible. The workaround with "visually-hidden" is the actually preferred solution here.
- Related to Task #104877: Introduce new DefaultButton as replacement for LinkButton in case href='#' added
- Related to Task #104882: Use button for dropdown instead of anchor added
- Related to Bug #104901: Links with missing href are not focusable by keyboard added
- Related to Bug #104905: Admin Tools > Environment > Image processing: use button-tags and correct headline-tags added
- Related to Bug #103925: Live search pagination has no keyboard actions implemented - and is also not reachable with keyboard navigation added
- Target version changed from 13 LTS to Candidate for Major Version
Also available in: Atom
PDF