Element affixes affect the weapon if the weapon has the same Element. since Element affixes can be found on any item, the item needs to be the same as the weapon for it to be affected.
Ice MH, Fire OH, Poison Chest. if I didn’t have a Prismatic effect, then if I had +5k and +20% Poison Damage on the Chest, it wouldn’t boost the damage of either weapon, as they have a different Element. now if I did have a Prismatic effect, the weapons would still not get the damage bonus, as they are still different Elements.
Ice MH, Fire OH, Fire Chest. if I had the +5k and +20% Fire Damage on the Chest, only the OH would get the Element Damage bonus. if you have a Prismatic effect, the OH Spells would still get the Damage bonus from the Fire Element, because they are the same Element from the start, but the MH isn’t, even when the MH becomes Fire from Prismatic.
this applies to Element Damage +, Element Damage %, and to Elemental Critical (Freeze, Toxic, Immolate, Orbit, Paralyze).
Elemental Critical Damage (Blistering for example) and the Legend Elemental Critical, can be on items that are different Elements than the weapons and still work. so if I had Ice Element for both my weapons, and Fire for my Chest with Blistering on it, I would need some kind of Prismatic effect that changes the Ice to Fire for the Blistering to work. I would also need Freeze/Frozen (Epic, since my weapons are both Ice) or Elemental Crit (Legend), as the Elemental Crit Damage only work with an Elemental Crit of the same Element. in this case, every time the target is Immolated, it gets Blistering.