| Index: Source/modules/accessibility/AXNodeObject.cpp
|
| diff --git a/Source/modules/accessibility/AXNodeObject.cpp b/Source/modules/accessibility/AXNodeObject.cpp
|
| index b57938e365e7efa71f7380b9b08ee9f39cda4570..d803643d6b48e2c8ff00877853baf5c13df0b9cc 100644
|
| --- a/Source/modules/accessibility/AXNodeObject.cpp
|
| +++ b/Source/modules/accessibility/AXNodeObject.cpp
|
| @@ -694,14 +694,19 @@ bool AXNodeObject::isChecked() const
|
| if (isHTMLInputElement(*node))
|
| return toHTMLInputElement(*node).shouldAppearChecked();
|
|
|
| - // Else, if this is an ARIA checkbox or radio OR ARIA role menuitemcheckbox
|
| - // or menuitemradio, respect the aria-checked attribute
|
| - AccessibilityRole ariaRole = ariaRoleAttribute();
|
| - if (ariaRole == RadioButtonRole || ariaRole == CheckBoxRole
|
| - || ariaRole == MenuItemCheckBoxRole || ariaRole == MenuItemRadioRole) {
|
| + // Else, if this is an ARIA role checkbox or radio or menuitemcheckbox
|
| + // or menuitemradio or switch, respect the aria-checked attribute
|
| + switch (ariaRoleAttribute()) {
|
| + case CheckBoxRole:
|
| + case MenuItemCheckBoxRole:
|
| + case MenuItemRadioRole:
|
| + case RadioButtonRole:
|
| + case SwitchRole:
|
| if (equalIgnoringCase(getAttribute(aria_checkedAttr), "true"))
|
| return true;
|
| return false;
|
| + default:
|
| + break;
|
| }
|
|
|
| // Otherwise it's not checked
|
| @@ -1420,6 +1425,7 @@ String AXNodeObject::title(TextUnderElementMode mode) const
|
| case MenuItemCheckBoxRole:
|
| case MenuItemRadioRole:
|
| case RadioButtonRole:
|
| + case SwitchRole:
|
| case TabRole:
|
| return textUnderElement(mode);
|
| // SVGRoots should not use the text under itself as a title. That could include the text of objects like <text>.
|
| @@ -1675,6 +1681,7 @@ bool AXNodeObject::canHaveChildren() const
|
| case PopUpButtonRole:
|
| case CheckBoxRole:
|
| case RadioButtonRole:
|
| + case SwitchRole:
|
| case TabRole:
|
| case ToggleButtonRole:
|
| case ListBoxOptionRole:
|
|
|