Problem/Motivation
The HTML elements added to the page by the google_cse library are not accessible in the following ways:
1) Search form: The search button is not labeled. A screen reader user will only hear "button" and be unsure or completely misunderstand what this button will do.
2) Search results: Sort by filter button is not labelled properly for screen readers or speech recognition users. (Divs containing text should be replaced with an actual select element, links, or clearly-labeled buttons.)
3) Search results: Tabs are visually apparent, but their roles are not conveyed and properly coded for a screen reader user. All a screen reader user hears is "Search" link or "X link" instead of "Search tab" etc. (Aria and role attributes and should be added)
Proposed resolution
Our sites are required to be accessible, so I was planning on implementing a JavaScript approach that would alter the markup on to the page (after it was added by CSE) to make it accessible.
I was initially thinking of doing this as a stand-alone module that we would require for any site using CSE, but then it occurred to me that it might be better if the solution was included in this module (perhaps a setting, enabled by default).
If this sounds like a reasonable approach, we'll begin work on a patch.