Barnsley are hovering two points above the relegation zone, but manager Jose Morais believes they were unlucky to miss out on a result.
"We were unlucky with the way things went," said Morais. "We had a penalty which wasn't given, we scored a goal and then had other opportunities but we couldn't score again.
"The opponent is second in the league and are a candidate to be in the Premier League next season and if we had started better, I believe we could have got more than we did.
"I am positive and I can be proud of how the players played the game and the attitude they had, especially in the second-half. I have a very positive outlook for the future.
"I saw good things, the way we reacted was very positive. We were playing away at second in the league and I can only say we deserved more from what we did.
"I cannot say we were worse than the opposition. We were level in the game for most of it and they were worried in the final part of the game."
Warnock's men, though, held for victory to take them to within three points of Championship front-runners Wolves.
"I said the last 20 minutes would define our season because they had their tails up and we were all at sea," said Warnock.
"If we can just keep ticking along, there are only 11 games left. If we get through to the international break and get players back then we will go from there.
"I think Wolves will still be quietly confident and Aston Villa and Fulham are favourites to go up. We will just tick along quietly.
"I have a great bunch of lads. I can't fault the effort. But people can't ever accuse our team of being physical after what we have seen.
"I was more disappointed at some of the things (that were) allowed to happen but it's another three points and we move on.
"It's a disgrace, how Kieffer Moore has not been sent off for two challenges I do not know. So, I'm extra pleased that we have stood up to that.
"We missed some easy chances that my wife could have put in."
Callum Paterson netted his second goal against the Tykes this season before Marko Grujic fired in from long-range to all but guarantee the Bluebirds' fifth successive victory.
However, Swansea loanee Oli McBurnie scored his fourth goal in three matches for Barnsley to make for a nervous finale at the Cardiff City Stadium.
Neil Warnock's men held on to earn a vital win to heap the pressure on Wolves, who had led the league by 13 points in February.
Kadeem Harris almost gave the Bluebirds the advantage on his first start of the season but hit the side-netting after he cut in and shot in the eighth minute.
Barnsley target man Kieffer Moore linked with his midfield moments later to make Cardiff goalkeeper Neil Etheridge stop Bradley Potts' low shot.
Kenneth Zohore was at the centre of the hosts' attacking threat as he aimed to score for the third game in a row.
He provided Craig Bryson with the opportunity to break the deadlock after Gary Gardner failed to clear a corner - but Tykes goalkeeper Nick Townsend saved his deflected effort.
The Danish forward then sent Harris one-on-one with Townsend and watched the winger's shot creep wide of the target.
However, the hosts finally got themselves in front after 31 minutes thanks to Paterson. A long clearance from Etheridge was played to Junior Hoilett, who looked for Zohore in the box.
Ethan Pinnock did well to close Zohore down as he lined up a shot on-goal but the ball fell kindly for the man who scored the winner at Oakwell to fire home from 15 yards.
It took only two minutes of the second half for the hosts to double their lead when Grujic was given the time and space to pick out the bottom corner from 25 yards out.
But the promotion candidates were pegged back by McBurnie. Tykes captain Andy Yiadom sent a dangerous ball into the box and the 21-year-old netted his fourth goal in three games to increase the nervous state of the home support.
The Scotland Under-21 international missed the chance to level moments later, before tempers flared when Moore charged into Etheridge.
There was still time for Cardiff to break away and go close through Craig Bryson, before Nathaniel Mendez-Laing struck the post at the death.