Problem/Motivation
For users of screenreaders, the field label on every checkbox/radio button will be "Select this item", which makes it hard to distinguish which entity the are selected.
Steps to reproduce
Open a media browser, inspect the HTML and look at the <label> tag. Notice that the checkbox or radio button for every entity has a label of "Select this item".
Proposed resolution
Change the label to "Select item ENTITY_LABEL".
Remaining tasks
- Post the patch!
User interface changes
No visible changes - only the invisible label seen by screenreaders.
API changes
No API changes.
Data model changes
No data model changes.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | entity_browser-screenreader-label-3461919-2.patch | 660 bytes | dsnopek |
Issue fork entity_browser-3461919
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
dsnopekHere is the patch!
Comment #5
anybodyThanks @dsnopek! I created a MR from your patch. This clearly improves the situation. Even better might be to use a configurable label from the views field. But let's treat that as follow-up.
Comment #7
anybodyComment #9
joevagyok commentedLatest release containing this is causing fatal error:
Error: Call to a member function label() on null in Drupal\entity_browser\Plugin\views\field\SelectForm->viewsForm() (line 129 of /var/www/html/build/modules/contrib/entity_browser/src/Plugin/views/field/SelectForm.php).We should not assume the presence of _entity over there, sometimes it can be null.
Comment #12
grevil commentedPlease review new MR with the regression fix.
Comment #13
anybody@joevagyok please test and review! :)
Comment #14
grevil commentedChanges LGTM!
Comment #15
joevagyok commentedThank you for the fast resolution!
Comment #16
grevil commentedYou are welcome!