This is not a petition, yet. I want to see what others think, I might be wrong.
Accessibility has been on my mind lately and I was doing some tests for a PR when I noticed that while performing a search in the media library, there’s no way for screen readers to see what has happened. There’s no “notification” basically. At least none that I can find.
One of the recommendations in such cases is to use role=“status”.
<div role="status">5 results returned.</div>
Right now, when you search for media on the main media library page (upload.php), there appears a small subheadline:
I think we could repurpose this subheadline into something a bit more useful and accessible:
It would look like this under the hood:
<span class="subtitle" role="status">Search results for "mom" - 5 items found</span>
The modal popup to insert media on the edit page doesn’t have this subheadline at all. So we would need to add something like this to the modal popup. I think initially, this could be implemented on the upload.php page and later on the media popup.
Looking over other searches in admin - theme, plugin, user, post/page, comments, etc. - none of them use
role="status" to tell screen readers what the search results are.
I believe content searches like posts, media, pages, comments, etc. use the same search functions and the same subheadline. So fixing one might fix it for all the other ones. Theme and plugin searches are different, will need a different approach.
Site note, maybe this could also be added to the frontend search results page.
Am I wrong? Would appreciate your feedback.