[wp-trac] [WordPress Trac] #47146: Live search does not announce results to assistive technologies
WordPress Trac
noreply at wordpress.org
Thu Sep 19 13:13:23 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 commit | javascript
-------------------------------------+-------------------------------------
Changes (by afercia):
* keywords: has-screenshots wpcampus-report has-patch => has-screenshots
wpcampus-report has-patch commit
Comment:
Testing again the proposed patch, turns out the `aria-modal="true"` added
to the media dialog in [45572] / #47145 prevents the ARIA live regions to
work as expected. For example with Safari + VoiceOver, the live regions
are ignored and the `speak()` messages are not announced. See the attached
screenshot.
This is the intended behavior of `aria-modal="true"` which is meant to
hide from assistive technologies any content that lives outside the
element it is applied to.
Given the current implementation of the `speak()` ARIA live region, `aria-
modal="true"` can't be used. I removed it from the latest patches.
[attachment:"47146-test.diff"] is for testing purposes: it logs to the
console the spoken messages.
[attachment:"47146.4.diff"] looks good for commit to me.
Test with a good browser / screen reader combination e.g.:
- Safari + VoiceOver
- Firefox + NVDA
- Chrome + JAWS
Test:
- search for attachments in the media modal dialog or in the media library
- check search results are announced
- in the media modal: when the search returns more than 40 results (40 is
the default limit) for example searching for `jpg` assuming you have more
than 40 jpg images:
- the first message is `Number of media items displayed: 40. Scroll the
page for more results.` (*note 1)
- scroll the page and a second message announces the new number of
results
Note 1: as mentioned previously, cropped images produce a mismatch between
the "per page" parameter and the actual number of results. For example
when there are 2 cropped images, the message will be:
`Number of media items displayed: 40 ...`
This should be addressed separately.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47146#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list