Yes, this is correct.
Highlighting mine. Note that attack rolls are not ability checks.*and are critical hits obviously but that wouldn't apply to other checks anyway
For example, when the hex spell imposes disadvantage on ability checks, this does not apply to attack rolls.