Search fields do not have the AXSubrole: AXSearchField
Created attachment 134948 [details]
Comment on attachment 134948 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=134948&action=review
> + // Some websites don't label their search fields as search, so we should fallback to some heuristics.
This comment doesn’t explain why these heuristics are helpful. Nor why these heuristics are sufficient.
> + String nameAttribute = getAttribute(nameAttr);
const AtomicString& nameAttribute = fastGetAttribute(nameAttr);
> +PASS nosearch.subrole is 'AXSubrole: '
Could use more coverage for the negative. For example, an element that is not in any form.
Need coverage for the “not case sensitive” aspect. All these are all lowercase so the “false” for case sensitive is not tested at all.