CUPComputer Use Protocol
Schema

Cross-Platform Mappings

How CUP's 59 roles map to native accessibility APIs on each platform.

Overview

CUP defines 59 canonical roles derived from ARIA. Each role maps to one or more native accessibility identifiers per platform. The complete mapping table is maintained in mappings.json in the protocol specification.

Entries with ? indicate context-dependent mappings where the CUP SDK uses heuristics to determine the correct role.

Common mappings

CUP RoleWindows (UIA)macOS (AX)Linux (AT-SPI2)Web (ARIA)
buttonButtonAXButtonROLE_PUSH_BUTTONbutton
checkboxCheckBoxAXCheckBoxROLE_CHECK_BOXcheckbox
textboxEditAXTextFieldROLE_ENTRYtextbox
linkHyperlinkAXLinkROLE_LINKlink
imgImageAXImageROLE_IMAGEimg
listListAXListROLE_LISTlist
listitemListItemAXGroup?ROLE_LIST_ITEMlistitem
menuMenuAXMenuROLE_MENUmenu
menuitemMenuItemAXMenuItemROLE_MENU_ITEMmenuitem
dialogWindow?AXWindow:AXDialogROLE_DIALOGdialog
tabTabItemAXRadioButton?ROLE_PAGE_TABtab
tableTableAXTableROLE_TABLEtable
sliderSliderAXSliderROLE_SLIDERslider
progressbarProgressBarAXProgressIndicatorROLE_PROGRESS_BARprogressbar
comboboxComboBoxAXComboBoxROLE_COMBO_BOXcombobox
windowWindowAXWindowROLE_FRAMEwindow
headingText?AXHeadingROLE_HEADINGheading
genericPane?|CustomAXGroup?|AXUnknownROLE_PANELgeneric
radioRadioButtonAXRadioButtonROLE_RADIO_BUTTONradio
switchCheckBox?AXCheckBox?ROLE_TOGGLE_BUTTON?switch

State mappings

States map more directly across platforms since they represent universal UI concepts (focused, disabled, expanded, etc.). The CUP SDK normalizes platform-specific state representations into the 16 canonical state flags.

Action mappings

Actions map to native platform APIs:

CUP ActionWindowsmacOSLinuxWeb
clickInvoke patternAXPressDoAction("click")element.click()
typeSetValue + SendKeysAXValue setEditableText.SetTextinput.value =
scrollScrollItem patternAXScrollBarDoAction("scroll")element.scroll()
toggleToggle patternAXPressDoAction("toggle")element.click()
expandExpandCollapseAXShowMenuDoAction("expand")aria-expanded
selectSelectionItemAXPressDoAction("select")element.click()

Extending mappings

CUP's role mappings also include Android and iOS platforms, with mappings to android.widget.* classes and iOS accessibility traits respectively. See the full mappings.json for the complete 6-platform table.

On this page