Blender's not really well suited for dicing dry foods, they typically need some sort of liquid to bring the solids down to the blades.
Food processor might be more what you're thinking about but it's more so for dice or mince. You won't ever really get an even chop out of a processor.
Spice blenders tend to have blades closer to the bottom and are fine for dry things. Still not good for dicing though, especially as onions aren't really dry but full of liquid.