The hi-hat technique is specifically referred to as "hi-hat lifts," "open hi-hats," and "opening/closing hi-hats." In both songs, the high-hat lifts are occurring on offbeats, which is very common in a disco beat like these.
Hi-hat technique
The technique involves playing the hi-hat on the downbeats and upbeats. On the upbeat, you lift the hi-hat with your left foot. At the same time as you lift the hi-hat, strike it with your stick. On the downbeat, you depress the pedal to close the hi-hat. To avoid a double hit on the downbeat, you strike the hi-hat with your stick at the same time as your foot depresses the hi-hat pedal. In most cases, you don't want to open the hi-hat fully and just want to open it slightly. The more open your hi-hat, the more the sound will ring out. But for a lot of scenarios, you're making pretty subtle foot movements.
Disco beat
The hi-hat technique creates a nice backbeat, which you can accentuate by adding the snare on beat 2. To get a complete disco beat, you can add the bass drum on all four beats (1, 2, 3, 4). The total result is something like this:
And here's a video of the hi-hat technique alone: