[wp-trac] [WordPress Trac] #47146: Live search does not announce results to assistive technologies

WordPress Trac noreply at wordpress.org
Thu Jun 27 15:10:31 UTC 2019


#47146: Live search does not announce results to assistive technologies
-------------------------------------+-------------------------------------
 Reporter:  anevins                  |       Owner:  afercia
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  5.3
Component:  Media                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-screenshots          |     Focuses:  accessibility,
  wpcampus-report has-patch          |  javascript
-------------------------------------+-------------------------------------

Comment (by afercia):

 [attachment:"47146.3.diff"] builds on top of the previous patch and does a
 few things:
 - Uses underscore.js `debounce()` to avoid the multiple announcements:
 200ms is a "magic number" and I'd like there was a better method to avoid
 debounce entirely. For now, it works.
 - Handles the case when the search results have "more" results that get
 displayed when scrolling the page. This actually depends on the viewport
 and happens when there are many search results. Also, worth considering
 #40330 proposes to remove the infinite scrolling.
 - the `console.log()`s are for testing purposes

 Worth noting that cropped images are not displayed in the media grid,
 while the list view does displays them. This may produce a mismatch
 between the "per page" parameter, which defaults to 40, and the actual
 number of results: when a cropped image is in the set of 40 results, only
 39 attachments are actually displayed in the grid. I believe there's
 already a specific ticket about this issue.

 Some testing and suggestions to avoid `debounce()` would be nice :)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47146#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list