diff --git a/accessible/mac/AccessibleWrap.mm b/accessible/mac/AccessibleWrap.mm index 759b1b841e25..b522cf55275d 100644 --- a/accessible/mac/AccessibleWrap.mm +++ b/accessible/mac/AccessibleWrap.mm @@ -123,10 +123,6 @@ Class AccessibleWrap::GetNativeType() { return [MOXOuterDoc class]; } - if (IsTextField()) { - return [mozTextAccessible class]; - } - return GetTypeFromRole(Role()); NS_OBJC_END_TRY_BLOCK_RETURN(nil); @@ -218,7 +214,10 @@ Class a11y::GetTypeFromRole(roles::Role aRole) { return [mozTabGroupAccessible class]; case roles::ENTRY: + case roles::CAPTION: + case roles::EDITCOMBOBOX: case roles::PASSWORD_TEXT: + // normal textfield (static or editable) return [mozTextAccessible class]; case roles::TEXT_LEAF: diff --git a/accessible/mac/Platform.mm b/accessible/mac/Platform.mm index 12b0ffe96e4e..d5eb008a40ab 100644 --- a/accessible/mac/Platform.mm +++ b/accessible/mac/Platform.mm @@ -68,8 +68,6 @@ void ProxyCreated(RemoteAccessible* aProxy) { type = [MOXWebAreaAccessible class]; } else if (aProxy->IsOuterDoc()) { type = [MOXOuterDoc class]; - } else if (aProxy->IsTextField()) { - type = [mozTextAccessible class]; } else { type = GetTypeFromRole(aProxy->Role()); } diff --git a/accessible/mac/mozAccessible.mm b/accessible/mac/mozAccessible.mm index 3e7ebc329053..6743eb3cfd5e 100644 --- a/accessible/mac/mozAccessible.mm +++ b/accessible/mac/mozAccessible.mm @@ -123,10 +123,6 @@ using namespace mozilla::a11y; if (state == states::BUSY) { [self moxPostNotification:@"AXElementBusyChanged"]; } - - if (state == states::EXPANDED) { - [self moxPostNotification:@"AXExpandedChanged"]; - } } - (BOOL)providesLabelNotTitle { diff --git a/accessible/mac/mozTextAccessible.mm b/accessible/mac/mozTextAccessible.mm index d023870d5e77..4993e220d228 100644 --- a/accessible/mac/mozTextAccessible.mm +++ b/accessible/mac/mozTextAccessible.mm @@ -106,7 +106,7 @@ inline NSString* ToNSString(id aValue) { } - (NSString*)moxRole { - if (mRole == roles::ENTRY && [self stateWithMask:states::MULTI_LINE]) { + if ([self stateWithMask:states::MULTI_LINE]) { return NSAccessibilityTextAreaRole; } diff --git a/accessible/tests/browser/mac/browser.toml b/accessible/tests/browser/mac/browser.toml index a7eceda05fc6..4619dc686652 100644 --- a/accessible/tests/browser/mac/browser.toml +++ b/accessible/tests/browser/mac/browser.toml @@ -35,8 +35,6 @@ https_first_disabled = true ["browser_bounds.js"] -["browser_combobox.js"] - ["browser_details_summary.js"] ["browser_focus.js"] diff --git a/accessible/tests/browser/mac/browser_combobox.js b/accessible/tests/browser/mac/browser_combobox.js deleted file mode 100644 index 2fd325581440..000000000000 --- a/accessible/tests/browser/mac/browser_combobox.js +++ /dev/null @@ -1,103 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -async function testComboBox(browser, accDoc, suppressPopupInValueTodo = false) { - const box = getNativeInterface(accDoc, "box"); - is(box.getAttributeValue("AXRole"), "AXComboBox"); - is(box.getAttributeValue("AXValue"), "peach", "Initial value correct"); - - let expandedChanged = waitForMacEvent("AXExpandedChanged", "box"); - let didBoxValueChange = false; - waitForMacEvent("AXValueChanged", "box").then(() => { - didBoxValueChange = true; - }); - await invokeContentTask(browser, [], () => { - const b = content.document.getElementById("box"); - b.ariaExpanded = true; - }); - - await expandedChanged; - if (suppressPopupInValueTodo) { - todo( - !didBoxValueChange, - "Value of combobox did not change when it was opened" - ); - todo_is(box.getAttributeValue("AXValue"), "peach"); - } else { - ok( - !didBoxValueChange, - "Value of combobox did not change when it was opened" - ); - is(box.getAttributeValue("AXValue"), "peach", "After popup value correct"); - } -} - -addAccessibleTask( - ` - -