Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The maxResults feature is not needed for BC with jQuery UI Autocomplete, nor has it been specifically requested, so lets remove to simplify the API.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#4 | interdiff_2-4.txt | 1.38 KB | bnjmnm |
#4 | 3236330-4-noMaxResults.patch | 4.46 KB | bnjmnm |
#2 | 3236330-noMaxResults.patch | 4.22 KB | bnjmnm |
Issue fork a11y_autocomplete-3236330
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
bnjmnmHaving some trouble with the issue fork so here's a patch.
Comment #3
nod_was a problem before but still is, this is not valid json, json.parse won't work on this.
need to be changed too, leftover max-items.
extra line
Comment #4
bnjmnmAddressing #3
Comment #5
nod_Removed
this.totalSuggestions
on commit because it wasn't used anymore.Comment #6
nod_Comment #8
nod_Comment #10
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer commentedGood call. I was going to file an issue to remove it, but procrastinated. You got there already.
Fair enough. I was bothered by it for a completely different reason though. It smacked of software trying to manage the user, rather than the user directing the action. Specifically this bit...
There are at least @count results available. Type additional characters to refine your search.',
This first withholds information from the user, and then makes them do additional work to obtain it. It runs counter to the oft-quoted book title: don't make me think.
Suppose maxItems is 10, and try these scenarios:
If the user is given all the results, they can decide for themselves whether they prefer to browse a large set, or narrow things down with a revised query. (A combobox or listbox can have any number of options; they're scrollable when they outgrow the available space.) The maxItems approach removes this choice, and forces the user to revise the query.
I think there's also a risk that users may (incorrectly) conclude that the thing they are looking for isn't available. Particularly sighted users, without a screen reader; the message was being conveyed in a visually-hidden "assistive hint". It sounds like this was trying to help blind users, but ended up discriminating against sighted users who aren't told this information.