Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.
87873[WIP][BUGFIX] Make Dropdown Toggle Buttons more accessible
Commit message
Test this change
Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch
- Check out patch set 11
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/73/87873/11 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/73/87873/11 && git cherry-pick FETCH_HEAD
Review
-
Code review CR 0 Needs a vote
-
Verified V 0 Needs a vote
- core-ci +1 CI
Relation chain 2
-
main
91093[BUGFIX] Add accessible relation between dropdown and its toggle
The chain has patch set 4 of 6, the changes above it need a rebase.
-
87873 [WIP][BUGFIX] Make Dropdown Toggle Buttons more accessible This change
Issues 2
Files 29
- Build/Sources/TypeScript/backend/security/element/csp-reports.ts+9 −4
- Build/Sources/TypeScript/backend/settings/editor/editable-setting.ts+8 −4
- Build/Sources/TypeScript/backend/tree/page-tree-element.ts+4 −5
- Build/Sources/TypeScript/backend/tree/tree-toolbar.ts+8 −5
- Build/Sources/TypeScript/form/backend/form-editor/component/form-element-selector.ts+14 −3
- Build/Sources/TypeScript/styleguide/element/theme-switcher-element.ts+9 −4
- Build/Sources/TypeScript/workspaces/renderable/record-table.ts+9 −3
- typo3/sysext/backend/Classes/Form/Element/SelectCheckBoxElement.php+9 −2
- typo3/sysext/backend/Classes/Form/Element/TablePermissionElement.php8+12 −5
- typo3/sysext/backend/Classes/RecordList/DatabaseRecordList.php+42 −10
- typo3/sysext/backend/Resources/Private/Language/locallang_settingseditor.xlf+3 −0
- typo3/sysext/backend/Resources/Private/Partials/Backend/Topbar.fluid.html+6 −2
- typo3/sysext/backend/Resources/Private/Templates/LiveSearch/Form.fluid.html+7 −3
- typo3/sysext/backend/Resources/Public/JavaScript/security/element/csp-reports.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/settings/editor/editable-setting.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/tree/page-tree-element.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/tree/tree-toolbar.js+1 −1
- typo3/sysext/filelist/Classes/FileList.php+18 −7
- typo3/sysext/form/Resources/Private/Templates/Backend/FormManager/Index.fluid.html+9 −9
- typo3/sysext/form/Resources/Public/JavaScript/backend/form-editor/component/form-element-selector.js+1 −1
Show 9 more files
- typo3/sysext/reactions/Resources/Private/Templates/Management/Overview.fluid.html+10 −4
- typo3/sysext/recycler/Resources/Private/Language/locallang.xlf+1 −1
- typo3/sysext/recycler/Resources/Private/Templates/RecyclerModule.fluid.html+8 −3
- typo3/sysext/redirects/Resources/Private/Templates/Management/Overview.fluid.html+7 −1
- typo3/sysext/scheduler/Resources/Private/Partials/TaskList.fluid.html+5 −5
- typo3/sysext/styleguide/Resources/Public/JavaScript/element/theme-switcher-element.js+1 −1
- typo3/sysext/viewpage/Resources/Private/Templates/Show.fluid.html+7 −2
- typo3/sysext/webhooks/Resources/Private/Templates/Management/Overview.fluid.html+10 −4
- typo3/sysext/workspaces/Resources/Public/JavaScript/renderable/record-table.js+1 −1
Review log 3344
Show 1519 earlier messages
-
Benjamin Kott uploaded patch set 1 01/24/25, 10:13
-
core-ci voted on patch set 1 V -1 01/24/25, 10:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72964
-
Benjamin Kott uploaded patch set 2
V -101/24/25, 12:27 -
Benjamin Kott uploaded patch set 3 01/24/25, 12:29
-
core-ci voted on patch set 2 V -1 01/24/25, 12:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72969
-
core-ci voted on patch set 3 V +1 01/24/25, 12:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72970
-
Benjamin Kott uploaded patch set 4
V +101/27/25, 08:36 -
core-ci voted on patch set 4 V +1 01/27/25, 08:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73049
-
Ayke Halder commented on patch set 4 V -1 01/27/25, 09:31
I recommend against duplicating the same text twice in `title` and `aria-label`. Only use `aria-label` for naming the button. If there is an additional description of the button, then additionaly set the `title`-attribute as description. https://github.com/FreedomScientific/standards-support/issues/654#issuecomment-1191063011 > * `aria-label` is the label (Accessible Name), > * `title` is the description (Accessible Description) > > and both must be output independently. E.g. for this button: ```html <button aria-label="More actions" title="More actions">Some text + icon</button> ``` JAWS screenreader makes announcements like: " 'More actions' (=aria-label) button 'More actions' (=title) " Should be: "'More actions' button" ---- I know that the `title` is used as hover-tooltip in TYPO3 BE. Some ideas on how to solve this when the `title`-attribute is completely removed: * Use recognizable icons that don't need any hover-tooltip. * Use always visible button-text like already implemented for the "Add content"-button. * Implement CSS-hover-tooltips based on `aria-label`: ```css button { position: relative; } button[aria-label]:after { display: none; position: absolute; top: 110%; left: 0.5em; content: attr(aria-label); } button[aria-label]:hover:after { display: block; } ``` -
Ayke Halder commented on patch set 4 01/27/25, 09:56
Here it is really about accessibility:Here it is really about accessibility: * Make Dropdown Toggle Buttons more accessible * Improve accessibility of Dropdown Toggle Buttonsalso: accessibility*an* aria-label -
Benjamin Kott commented on patch set 4 01/27/25, 10:53
Reply
I cannot test JAWS, as i have no access - and cannot even easily buy a license as i need to contact some kind of vendor in Germany, in addition its quite expensive too (2-3k from what i can find). I´ve tested, Narrator (Windows), NVDA and VoiceOver (MacOS) they do not read the title and aria label twice, when the content match. So, I consider this JAWS problem, where they decided to behave differently than other available options. We need to have the title attribute as they provide the default tooltips on all systems. Disabling the default tooltips only for the sake of a proprietary screen reader feels wrong. I am aware of the market share for jaws - but i also see the declining trend since 2019. I am open for any technical reasoning, also for making it better for jaws users - but only if it does not affect any other users, which in this case it does. Adding a custom tooltip via CSS only is problematic, as it now needs to be context aware, as we also handle overflows etc - We would need to add JavaScript here to make it work, we dropped JavaScript handling for tooltips in v8/v9? I understand that it´s not the best case for JAWS users, but i also don´t feel that this is a blocking issue. -
Ayke Halder commented on patch set 4 01/27/25, 11:14
Reply
In general the handling of the `title`-attribute by screenreaders is unpredictable. Whenever possible drop the `title`-attribute completely and use alternative implementations. ---- https://www.w3.org/WAI/WCAG21/Techniques/html/H33#description > Because of the extensive user agent limitations in supporting access to the title attribute, authors should use caution in applying this technique. For this reason, it is preferred that the author use technique > > * "C7: Using CSS to hide a portion of the link text" > https://www.w3.org/WAI/WCAG21/Techniques/css/C7 > > * or "H30: Providing link text that describes the purpose of a link for anchor elements". > https://www.w3.org/WAI/WCAG21/Techniques/html/H30 ---- https://wave.webaim.org/api/docs?format=html#title_redundant > **Redundant title text - title_redundant** > > **What it means:** > Title attribute text is the same as text or alternative text. > > **Why It Matters:** > The title attribute value is used to provide advisory information. It typically appears when the users hovers the mouse over an element. The advisory information presented should not be identical to or very similar to the element text or alternative text. > > **What To Do:** > In most cases the title attribute can be removed, otherwise modify it to provide advisory, but not redundant information. Note that the title text may or may not be read by a screen reader and is typically inaccessible to sighted keyboard users. ---- A11y team / @michael.telgkamp@mindscreen.de Please have a look at this patch here. -
Benjamin Kott commented on patch set 4 01/27/25, 11:41
Reply
I think this is mixed up, the case they are describing is having a more equivalent to the following cases: <img title="title" alt="title" /> <button title="title">title</button> Redundant texts for screen readers have been removed that previously were displayed with `visually-hidden` to only rely on aria-label or title for tooltips. As screen-readers (except jaws) are omitting duplicate output when the contents of aria-label and title match. Since title is unpredictable as mentioned, aria-label is added. -
Benjamin Kott commented on patch set 4 01/27/25, 11:48
Reply
In addition to that, the meaning for title and alt are different for images and must contain different contents for different use cases. While the title is more or less considered as "name" of the image the alt text is used to describe the image. When we talk about linked images there is another difference, as it may be considered as an interactive element and then the alt text (should) describe the action instead of the image. But it depends on the content how that holds true. -
Ayke Halder commented on patch set 4 01/27/25, 15:16
Reply
This is about `button`/`a` with identical `title` and `aria-label` here. For a JAWS demo just download any version and run it in demo-mode for up to 40 minutes in a row - then just restart your PC and run it for another 40 minutes… and so on. * German: https://www.freedomsci.de/serv01.htm (Click on version link in text.) * English: https://support.freedomscientific.com/Downloads/JAWS ---- In general: * The announced label is read from: first `aria-label`/`aria-labelledby`, then text-node and if all fails might be even `title`. * The announced description is read from: first `aria-description`/`aria-describedby`, then `title`, then parent-elements `title`. ----- ```html <button aria-label="Some action" title="Some description" >This is ignored as aria-label is set.</button> ``` Screanreaders readout is: " 'Some action' button 'Some description' " ---- ```html <button aria-label="Some action" title="Some action" >This is ignored as aria-label is set.</button> ``` There are special features implemented in most screenreaders to not repeat identical label and description - so readout in this case becomes: " 'Some action' button" Some screenreaders might still readout: " 'Some action' button 'Some action' " ---- As mentioned above: `aria-description` takes precedence over `title`. ```html <button aria-label="Some action" aria-description="" <- empty title="This is ignored as aria-description is set." >This is ignored as aria-label is set.</button> <button aria-description="" <- empty title="This is ignored as aria-description is set." >Some action</button> ``` Screanreaders readout is: " 'Some action' button" ---- So in case the `title`-attribute is necessary, but identical to `aria-label`/text-node: Set `aria-description=""` to disable readout of `title` in all screenreaders. ```html <button aria-label="Some action" aria-description="" <- empty title="Some action" >…</button> <button aria-description="" <- empty title="Some action" >Some action</button> ``` And in case there is no need for a `title`-attribute: ```html <button aria-label="Some action" >…</button> <button>Some action</button> ``` -
Ayke Halder commented on patch set 4 01/27/25, 18:53
Reply
Just tested with NVDA: empty `aria-description=""` does not work. NVDA works only when using an ugly null character hack. ```html <button aria-label="Some action" aria-description="�" title="This is ignored as aria-description is set." >This is ignored as aria-label is set.</button> ``` -
Ayke Halder commented on patch set 4 01/27/25, 19:47
Reply
The bug from above with empty `aria-description=""` not taken into account looks like NVDA + Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1944115 ---- The browser actually decides what to use for 'description': https://www.w3.org/TR/html-aam-1.0/#accdesc-computation > The following list represents the order of precedence for user agents to compute the accessible description of an element. > … > 3. Otherwise, use the flat string of the `title` attribute **if it was not used as the accessible name** for the element. Unfortunately this is not very clear: * Either: "If the [identical] string was not used …" * Or: "If the `title` attribute [itself] was not used …" Same blurry wording here: https://www.w3.org/TR/accname-1.2/#mapping_additional_nd_description > 4. host language tooltip attribute or equivalent feature (e.g., HTML title attribute) > Only use if not already used for the accessible name of this node -
Michael Telgkamp commented on patch set 4 V +1 02/04/25, 12:27
Reply
I tested these cases with JAWS 2024 and Firefox/Edge as well as NVDA 2024.4.2 and Firefox/Edge. All combinations do not read the `title` as description when it is identical to the aria-label. Apart from that, we also suggest not to use the `title` attribute the way it is currently used in TYPO3, and we will provide a solution for an accessible tooltip for all TYPO3 use cases. As long as this solution is not in place, we decided to use the `title` attribute as it does not cause a lot of harm and hopefully all occurrences can be found quickly when it will be changed in the future. We currently do not recommend to use aria-description, as it still is in W3C Editor's Draft for ARIA 1.3 and not fully supported. Also, the title being read out twice can be considered a minor problem. I would prefer not to add another temporary workaround to make the `title` workaround work as expected for some use cases that are related to some special settings or older screen reader versions. -
Michael Telgkamp commented on patch set 4 CR -1 02/04/25, 15:35
For Buttons controlling the display of other elements, the `aria-expanded` state must be set and the element that is controlled should be connected using `aria-contols`. See https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/ For multiple options that are shown on button press, the menu button pattern https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/ should be used. For dropdowns that show a list of selectable options, the listbox pattern https://www.w3.org/WAI/ARIA/apg/patterns/listbox/ should be used.
-
Michael Telgkamp commented on patch set 4 02/04/25, 16:06
Topbar.html:59Missing `aria-expanded` attribute here. The value change on activation also needs to be checked. As the element shown has the role menu, it might be reasonable to consider this element a menu-button. One remark: the role `menu` of the opened element seems not to be the correct option for the "System Information" element. But this should be another issue. -
Benjamin Kott uploaded patch set 5
CR -1V +102/05/25, 07:15 -
Benjamin Kott commented on patch set 5 02/05/25, 07:20
Reply
AcknowledgedTopbar.html:59ReplyAck, added missing aria-expanded and aria-controls here. On the remark of the wrong role - i dropped it for now. It's marked in the browser as invalid not only on system-information but on almost all entries as missing necessary child structure. We cannot define the role on the outer container as we have no control about what is added to the dropdown here, as it´s also extendable by the user/developer. We should check the contents of the dropdowns again, and add the necessary roles there. -
core-ci voted on patch set 5 V +1 02/05/25, 07:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73552
-
Benjamin Kott updated the commit message in patch set 6
V +102/05/25, 07:21 -
core-ci voted on patch set 6 V +1 02/05/25, 07:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73553
-
Benjamin Franzke commented on patch set 6 CR +1 02/07/25, 13:27
TablePermissionElement.php:268Could have been placed on separate lines. -
Benjamin Franzke commented on patch set 6 V +1 02/07/25, 13:45
Tested with NVDA. -
Ayke Halder commented on patch set 6 02/07/25, 13:57
Reply
Most dropdown's `<button aria-expanded="…">` are still missing the `aria-controls`-attribute.Reply
So let's keep the `title`-attribute - and as soon as there is a better tooltip solution completely remove all `title`-attributes. -
Ayke Halder commented on patch set 6 CR -1 02/07/25, 14:29
PermissionTable needs special titles for the dropdown-buttons depending on table-column.TablePermissionElement.php:267This is actually the table column-header here. Insert some meaningfull title that changes depending on which permission is edited with this button: no access / read / read & writeTablePermissionElement.php:268In case this is read-only, there is no need for any dropdown-menu. `<button disabled>` might not be read-out by screenreaders. Maybe if it is read-only replace this whole struct with something like: ``` <span class="dropdown-toggle dropdown-toggle-link disabled" > ' . $this->iconFactory->getIcon('actions-selection', IconSize::SMALL)->render() . ' <span class="sr-readonly">no access / read / read & write - depending on which permission is rendered in this table-column"</span> </span> . ``` -
Ayke Halder commented on patch set 6 02/07/25, 14:40
Reply
Table-header might also be added in front of the "open selection options"-button.TablePermissionElement.php:166Or maybe it's easier to add some title for the column-header here directly in front of the dropwdown-button - instead of including the title into the dropdown-button itself. -
Markus Timtner uploaded patch set 7
CR +1V +110/15/25, 14:55 -
Markus Timtner commented on patch set 7 CR +1 V +1 10/15/25, 14:59
TablePermissionElement.php:166ReplyHi from #a11ysprint2025: no, that won't be easier, since the button element has to be focused in order to know what it is for. Might lead to more confusion than instead of being helpful.TablePermissionElement.php:268ReplyHi from #a11ysprint2025: since button=disabled is reliable in screenreaders, no need to complicate this further.TablePermissionElement.php:268ReplyDone -
core-ci voted on patch set 7 V -1 10/15/25, 15:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86736
-
Markus Timtner commented on patch set 7 10/15/25, 19:22
Reply
Hi from #a11ysprint2025: ok as just discussed, we want to have the aria-controls right, so I will add these now. [...] Here all done: https://review.typo3.org/c/Packages/TYPO3.CMS/+/91093/1Reply
Hi from #a11ysprint2025: No longer needed, we added an aria-label to the button.TablePermissionElement.php:267ReplyDone -
Benjamin Franzke uploaded patch set 8
CR +1V +110/15/25, 21:56 -
core-ci voted on patch set 8 V +1 10/15/25, 22:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86767
-
Benjamin Kott uploaded patch set 9
V +104/01/26, 11:58 -
core-ci voted on patch set 9 V -1 04/01/26, 12:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99396
-
Benjamin Kott uploaded patch set 10
V -104/01/26, 13:56 -
core-ci voted on patch set 10 V +1 04/01/26, 14:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99409
-
Benjamin Kott uploaded patch set 11
V +104/02/26, 06:55 -
core-ci voted on patch set 11 V +1 04/02/26, 07:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99440
-
Benjamin Kott marked it work in progress 10/16/26, 14:08