diff --git a/accessible/ipc/RemoteAccessibleBase.cpp b/accessible/ipc/RemoteAccessibleBase.cpp index 29cd9e2af0b1..07900211f8db 100644 --- a/accessible/ipc/RemoteAccessibleBase.cpp +++ b/accessible/ipc/RemoteAccessibleBase.cpp @@ -771,9 +771,8 @@ Relation RemoteAccessibleBase::RelationByType( Relation rel = Relation(); // HTML radio buttons with cached names should be grouped. if (IsHTMLRadioButton()) { - auto maybeName = - mCachedFields->GetAttribute(nsGkAtoms::radioLabel); - if (!maybeName) { + nsString name = GetCachedHTMLNameAttribute(); + if (name.IsEmpty()) { return rel; } @@ -782,7 +781,7 @@ Relation RemoteAccessibleBase::RelationByType( ancestor = ancestor->RemoteParent(); } Pivot p = Pivot(ancestor); - PivotRadioNameRule rule(*maybeName); + PivotRadioNameRule rule(name); Accessible* match = p.Next(ancestor, rule); while (match) { rel.AppendTarget(match->AsRemote());