@@ -369,6 +369,38 @@ CComPtr<IAccessible2> GeckoVBufBackend_t::getSelectedItem(
369369 return nullptr ;
370370}
371371
372+ /* *
373+ * Get the text box inside a combo box, if any.
374+ */
375+ CComPtr<IAccessible2> getTextBoxInComboBox (
376+ IAccessible2* comboBox
377+ ) {
378+ CComPtr<IDispatch> childDisp;
379+ // We only check the first child.
380+ if (FAILED (comboBox->get_accChild (CComVariant (1 ), &childDisp))) {
381+ return nullptr ;
382+ }
383+ CComQIPtr<IAccessible2> child = childDisp;
384+ if (!child) {
385+ return nullptr ;
386+ }
387+ long role;
388+ if (FAILED (child->role (&role))) {
389+ return nullptr ;
390+ }
391+ if (role != ROLE_SYSTEM_TEXT) {
392+ return nullptr ;
393+ }
394+ CComVariant state;
395+ if (FAILED (child->get_accState (CComVariant (CHILDID_SELF), &state))) {
396+ return nullptr ;
397+ }
398+ if (state.vt != VT_I4 || !(state.lVal & STATE_SYSTEM_FOCUSABLE)) {
399+ return nullptr ;
400+ }
401+ return child;
402+ }
403+
372404const vector<wstring>ATTRLIST_ROLES (1 , L" IAccessible2::attribute_xml-roles" );
373405const wregex REGEX_PRESENTATION_ROLE (L" IAccessible2\\\\ :\\\\ :attribute_xml-roles:.*\\ bpresentation\\ b.*;" );
374406
@@ -969,6 +1001,25 @@ VBufStorage_fieldNode_t* GeckoVBufBackend_t::fillVBuf(IAccessible2* pacc,
9691001 }
9701002 }
9711003
1004+ } else if (role == ROLE_SYSTEM_COMBOBOX) {
1005+ CComPtr<IAccessible2> textBox = getTextBoxInComboBox (pacc);
1006+ if (textBox) {
1007+ // ARIA 1.1 combobox. Render the text box child.
1008+ if (tempNode = this ->fillVBuf (textBox, buffer, parentNode, previousNode,
1009+ paccTable, paccTable2, tableID, presentationalRowNumber,
1010+ ignoreInteractiveUnlabelledGraphics)
1011+ ) {
1012+ previousNode=tempNode;
1013+ } else {
1014+ LOG_DEBUG (L" Error in calling fillVBuf" );
1015+ }
1016+ } else if (value) {
1017+ previousNode=buffer->addTextFieldNode (parentNode,previousNode,value);
1018+ if (previousNode && !locale.empty ()) {
1019+ previousNode->addAttribute (L" language" , locale);
1020+ }
1021+ }
1022+
9721023 } else {
9731024 // There were no children to render.
9741025 if (role==ROLE_SYSTEM_GRAPHIC) {
0 commit comments