82408[TASK] Add HTML label/option accessibillity to SelectMultipleSideBySide
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 2
Review log 2733
Show 68 earlier messages
-
Christian Rath-Ulrich uploaded patch set 1 01/09/24, 08:57
-
core-ci voted on patch set 1 V +1 01/09/24, 09:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51309
-
Kai Ole Hartwig voted on patch set 1 CR +1 01/24/24, 09:21
-
Kai Ole Hartwig voted on patch set 1 V +1 01/24/24, 09:21
-
Garvin Hicking commented on patch set 1 01/25/24, 19:33
Maybe the commit message could be improved to something like: Title: ``` [TASK] Add HTML label/option accessibillity to SelectMultipleSideBySide ``` (intentionally changed to a TASK because it's something in between a bugfix and a feature. ;) ) Body: ``` The TCA render type `SelectMultipleSideBySide` now properly relates the `select` HTML elements with their respective `label` elements. Also HTML `option` tags now use proper `aria-label` attributes. ``` A clear title and body helps a lot for the documentation team, that writes documentation based on changelogs, so they can easier see what may be adressed without needing to dive too much into code. Also possible later code fixes have a better history and see the intention of changes. Do other TCA renderTypes not need this, are their houses in order? 😊 -
Christian Rath-Ulrich updated the commit message in patch set 2
CR +1V +101/26/24, 11:14 -
Christian Rath-Ulrich commented on patch set 2 01/26/24, 11:16
Reply
I'm not quite sure! I'm working along a list of accessibility issues, it could be that the other renderTypes come further down the list... -
core-ci voted on patch set 2 V +1 01/26/24, 11:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52232
-
Garvin Hicking commented on patch set 2 CR +1 V +1 01/26/24, 11:20
Reply
Alright. Well, multiple PRs per renderType are probably also easier to review. Thanks! -
Guido Schmechel commented on patch set 2 CR -1 01/27/24, 14:21
Basically everything works fine, just one point too many in the title attribute. Therefore a relaxed -1 ;-)SelectMultipleSideBySideElement.php:165We now have a point in the title attribute hereSelectMultipleSideBySideElement.php:448Here also a point -
Christian Rath-Ulrich uploaded patch set 3
CR +1V +101/30/24, 19:27 -
Christian Rath-Ulrich commented on patch set 3 01/30/24, 19:28
SelectMultipleSideBySideElement.php:165ReplyDoneSelectMultipleSideBySideElement.php:448ReplyDone -
core-ci voted on patch set 3 V +1 01/30/24, 19:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52517
-
Guido Schmechel voted on patch set 3 CR +1 V +1 01/30/24, 19:56
-
Kai Ole Hartwig voted on patch set 3 CR +1 01/30/24, 19:58
-
Kai Ole Hartwig voted on patch set 3 V +1 01/30/24, 19:58
-
Anja Leichsenring commented on patch set 3 V -1 01/31/24, 06:47
the option aria-label addition is fine, but I question the select field labels. For the left side, already the main label is connected. Right side is missing, that is true and here the addition makes sense. I don't like the duplication, any field should have only one label connected. -
Christian Rath-Ulrich commented on patch set 3 02/07/24, 12:05
Reply
you're absolutely right, and to be honest i don't know exactly how to fix it. for a visually unoriented person, the first lable is important to understand what content is being manipulated. but the other two labels are also important because otherwise you can't recognize the manipulation itself, i.e. what exactly has been selected. My suggestion here would be to make the whole thing a field set and the first lable a legend. then the other two lables can stay. or is there a better idea? -
Christian Rath-Ulrich uploaded patch set 4
CR +1V +102/07/24, 12:25 -
core-ci voted on patch set 4 V +1 02/07/24, 12:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52858
-
Simon Schaufelberger commented on patch set 4 02/07/24, 12:34
SelectMultipleSideBySideElement.php:506This line can be minified to: `return '<legend><h5>' . $legendContend . '</h5></legend>';` I don't see a reason th use the extra concatenation -
Christian Rath-Ulrich uploaded patch set 5
V +102/07/24, 13:06 -
Christian Rath-Ulrich commented on patch set 5 02/07/24, 13:07
SelectMultipleSideBySideElement.php:506Replytrue -
core-ci voted on patch set 5 V +1 02/07/24, 13:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52860
-
Jörg Bösche voted on patch set 5 CR +1 02/27/24, 08:20
-
Ayke Halder commented on patch set 5 07/17/24, 12:24
Please also fix the `<a href="#">` buttons so that they are recognized as buttons by screenreaders: '{LABEL} Button' Otherwise the screenreader might read out something like: '{LABEL} visited link'SelectMultipleSideBySideElement.php:164IMO this should be fine: ``` <option value="{VALUE}">{TITLE}</option> ``` There is no need for: ``` <option value="{VALUE}" title="{TITLE}" aria-label="{TITLE}">{TITLE}</option> ```SelectMultipleSideBySideElement.php:287Can we somehow replace the current `div`-element by `fieldset` - or will this destroy the styling? E.g. ``` $html[] = '<fieldset class="formengine-field-item t3js-formengine-field-item">'; $html[] = '<legend>' $html[] = '<h5>' . $this->renderLabel($selectedOptionsFieldId) . '<h5>'; $html[] = $fieldInformationHtml; // This should also be part of the legend, shouldn't it? $html[] = '</legend>' $html[] = '<div class="form-wizards-wrap">'; ```SelectMultipleSideBySideElement.php:310Add aria-role here: E.g. see https://getbootstrap.com/docs/5.0/components/button-group/ `<div class="btn-group-vertical" role="group" aria-label="Describe what these buttons are doing.">SelectMultipleSideBySideElement.php:312Actually this is real ARIA thing here: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/button_role Never use `<a href="#">` without declaring `role="button"`. And even better use `<button type="button">` instead. So change these either to: * `<a href="#" role="button" …>…</a>` or * `<button type="button" …>…</button>` (By changing these to `<button>` you must check if styles and JS is still working as expected.)SelectMultipleSideBySideElement.php:447IMO this should be fine: ``` <option value="{VALUE}">{TITLE}</option> ``` There is no need for: ``` <option value="{VALUE}" title="{TITLE}" aria-label="{TITLE}">{TITLE}</option> ```SelectMultipleSideBySideElement.php:461Maybe also add `fieldset` & `legend` here.SelectMultipleSideBySideElement.php:499Parameter `$for` is never used - remove it. -
Christian Rath-Ulrich uploaded patch set 6
CR +1V +107/17/24, 14:07 -
Christian Rath-Ulrich commented on patch set 6 07/17/24, 14:08
SelectMultipleSideBySideElement.php:164ReplyIs the specific labelling of selectable elements not also a requirement?SelectMultipleSideBySideElement.php:287ReplyLooks good if I adapt this changeSelectMultipleSideBySideElement.php:312ReplyDoneSelectMultipleSideBySideElement.php:447ReplyIs the specific labelling of selectable elements not also a requirement?SelectMultipleSideBySideElement.php:461ReplyDoneSelectMultipleSideBySideElement.php:499ReplyRefactored that the parameter now is correctly named and used -
core-ci voted on patch set 6 V -1 07/17/24, 14:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61694
-
Ayke Halder commented on patch set 6 CR -1 07/17/24, 15:11
Reply
DoneUnresolved
Use `aria-label` instead of `title` attribute. Remove unnecessary attributes from `<option>`-tags. Fix closing `</fieldset>`-tag. --- In general for accessibility reasons better **never at all** use the attribute `title`: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title#accessibility_concernsSelectMultipleSideBySideElement.php:164Reply UnresolvedSpecific labeling is not a requirement as long as you use the 'real' tag `option`: * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#label > **label** > This attribute is text for the label indicating the meaning of the option. If the label attribute isn't defined, **its value is that of the element text content**. If the **elements text content** is not an appropriate label, then of course you could override it via attribute `label`. In this specific case here they are identical - so no need to set any label/title/aria-label. --- In case you use some other tag with added `role="option"`, you must set all the labels and other things by yourself: * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/option_roleSelectMultipleSideBySideElement.php:310ReplyDoneSelectMultipleSideBySideElement.php:313UnresolvedBetter use the attribute `aria-label` instead of `title`. Also see: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title#accessibility_concernsSelectMultipleSideBySideElement.php:394UnresolvedDon't fix the spacing here - just keep it like it is, so that this line does not change.SelectMultipleSideBySideElement.php:480UnresolvedThis closing `</div>`-tag must stay as-is and cannot be removed.SelectMultipleSideBySideElement.php:481UnresolvedBut this closing `</div>`-tag here must become a closing `</fieldset>`-tag. -
Anja Leichsenring wrote 07/31/24, 18:19
Removed reviewer Anja Leichsenring. -
Benni Mack updated the commit message in patch set 7
CR -1V -110/18/24, 13:40 -
Oli Bartsch abandoned the change 12/18/24, 11:07
I'm abandoning this since there's been no activity on this for several months. If you'd like to pick it up again in the future, feel free to restore it anytime. Thanks!