commit f25db7cef8ac153bcc8d04559f6347fa8f224e30
parent 79d0242ba6e7b26b1bc5e14b73e6a9d2f91b16f8
Author: Cosmin Sabou <csabou@mozilla.com>
Date: Tue, 4 Nov 2025 19:24:32 +0200
Revert "Bug 1992028 - Implement details-from attribute. r=Jamie" for causing mda and dt failures.
This reverts commit 7224b9290783af14f443f77a07f0d82d45331a5d.
Diffstat:
5 files changed, 3 insertions(+), 64 deletions(-)
diff --git a/accessible/generic/LocalAccessible.cpp b/accessible/generic/LocalAccessible.cpp
@@ -1169,22 +1169,6 @@ already_AddRefed<AccAttributes> LocalAccessible::Attributes() {
}
}
- nsString detailsFrom;
- AssociatedElementsIterator iter(mDoc, Elm(), nsGkAtoms::aria_details);
- if (iter.Next()) {
- detailsFrom.AssignLiteral("aria-details");
- } else if (GetCommandForDetailsRelation()) {
- detailsFrom.AssignLiteral("command-for");
- } else if (GetPopoverTargetDetailsRelation()) {
- detailsFrom.AssignLiteral("popover-target");
- } else if (GetAnchorPositionTargetDetailsRelation()) {
- detailsFrom.AssignLiteral("css-anchor");
- }
-
- if (!detailsFrom.IsEmpty()) {
- attributes->SetAttribute(nsGkAtoms::details_from, std::move(detailsFrom));
- }
-
return attributes.forget();
}
diff --git a/accessible/ipc/RemoteAccessible.cpp b/accessible/ipc/RemoteAccessible.cpp
@@ -1752,8 +1752,8 @@ already_AddRefed<AccAttributes> RemoteAccessible::Attributes() {
CacheDomain::State | // State
CacheDomain::Viewport | // State
CacheDomain::Table | // TableIsProbablyForLayout
- CacheDomain::DOMNodeIDAndClass | // DOMNodeID
- CacheDomain::Relations)) {
+ CacheDomain::DOMNodeIDAndClass // DOMNodeID
+ )) {
return attributes.forget();
}
@@ -1896,21 +1896,6 @@ already_AddRefed<AccAttributes> RemoteAccessible::Attributes() {
attributes->SetAttribute(nsGkAtoms::aria_valuetext, std::move(valuetext));
}
- nsString detailsFrom;
- if (mCachedFields->HasAttribute(nsGkAtoms::aria_details)) {
- detailsFrom.AssignLiteral("aria-details");
- } else if (mCachedFields->HasAttribute(nsGkAtoms::commandfor)) {
- detailsFrom.AssignLiteral("command-for");
- } else if (mCachedFields->HasAttribute(nsGkAtoms::popovertarget)) {
- detailsFrom.AssignLiteral("popover-target");
- } else if (mCachedFields->HasAttribute(nsGkAtoms::target)) {
- detailsFrom.AssignLiteral("css-anchor");
- }
-
- if (!detailsFrom.IsEmpty()) {
- attributes->SetAttribute(nsGkAtoms::details_from, std::move(detailsFrom));
- }
-
return attributes.forget();
}
diff --git a/accessible/tests/browser/relations/browser_anchor_positioning.js b/accessible/tests/browser/relations/browser_anchor_positioning.js
@@ -76,11 +76,6 @@ addAccessibleTask(
const target1 = findAccessibleChildByID(docAcc, "target1");
await testDetailsRelations(btn1, target1);
- is(
- btn1.attributes.getStringProperty("details-from"),
- "css-anchor",
- "Correct details-from attribute"
- );
info("Make anchor invalid");
await invokeContentTaskAndTick(browser, [], () => {
Object.assign(content.document.getElementById("btn1").style, {
@@ -453,7 +448,7 @@ addAccessibleTask(
<div id="target-targetsetdetails" aria-details="" class="target">World</div>
<button id="btn-targetsetdetails">Hello</button>
`,
- async function testOtherRelationsWithAnchor(browser, docAcc) {
+ async function testTooltipPositionAnchor(browser, docAcc) {
info("Test no details relations when explicit relations are set");
const btnDescribedby = findAccessibleChildByID(docAcc, "btn-describedby");
const targetDescribedby = findAccessibleChildByID(
diff --git a/accessible/tests/browser/relations/browser_popover_and_command.js b/accessible/tests/browser/relations/browser_popover_and_command.js
@@ -42,12 +42,6 @@ addAccessibleTask(
await testCachedRelation(toggleSibling, RELATION_DETAILS, []);
await testCachedRelation(popover, RELATION_DETAILS_FOR, toggle1);
- is(
- toggle1.attributes.getStringProperty("details-from"),
- "popover-target",
- "Correct details-from attribute"
- );
-
info("Setting toggle2 popovertarget");
await invokeSetAttribute(browser, "toggle2", "popovertarget", "popover");
await testCachedRelation(toggle2, RELATION_DETAILS, popover);
@@ -140,16 +134,10 @@ addAccessibleTask(
// of the popover.
await testCachedRelation(toggleSibling, RELATION_DETAILS, []);
await testCachedRelation(popover, RELATION_DETAILS_FOR, [toggle1, show]);
- is(
- toggle1.attributes.getStringProperty("details-from"),
- "command-for",
- "Correct details-from attribute"
- );
info("Setting toggle2 commandfor");
await invokeSetAttribute(browser, "toggle2", "commandfor", "popover");
await testCachedRelation(toggle2, RELATION_DETAILS, popover);
-
await testCachedRelation(popover, RELATION_DETAILS_FOR, [
toggle1,
show,
@@ -166,12 +154,6 @@ addAccessibleTask(
const details = findAccessibleChildByID(docAcc, "details");
// aria-details overrides popover.
await testCachedRelation(toggle1, RELATION_DETAILS, details);
- is(
- toggle1.attributes.getStringProperty("details-from"),
- "aria-details",
- "Correct details-from attribute"
- );
-
await testCachedRelation(popover, RELATION_DETAILS_FOR, [show]);
info("Removing aria-details from toggle1");
@@ -179,12 +161,6 @@ addAccessibleTask(
await testCachedRelation(toggle1, RELATION_DETAILS, popover);
await testCachedRelation(popover, RELATION_DETAILS_FOR, [toggle1, show]);
- is(
- toggle1.attributes.getStringProperty("details-from"),
- "command-for",
- "Correct details-from attribute"
- );
-
info("Hiding popover");
let hidden = waitForEvent(EVENT_HIDE, popover);
toggle1.doAction(0);
diff --git a/xpcom/ds/StaticAtoms.py b/xpcom/ds/StaticAtoms.py
@@ -340,7 +340,6 @@ STATIC_ATOMS = [
Atom("description", "description"),
Atom("destructor", "destructor"),
Atom("details", "details"),
- Atom("details_from", "details-from"),
Atom("deviceAspectRatio", "device-aspect-ratio"),
Atom("deviceHeight", "device-height"),
Atom("devicePixelRatio", "device-pixel-ratio"),