Germany could not match (nor Italy) the Royal navy but with a focus on aircraft carriers the match for some zone could have been different. Moreover the idea of aircraft carriers was not so secret, as well as the utility of aircrafts against shipping.
AFAIK Germany tried to build only one aircraft carrier that then was scuttled near Stettin.
The French built one aircraft carrier in the 1920s. called the Bearn, it was similar to HMS Eagle. Both were built on the hulls of World War I era battleships, could go 24 knots top speed and carry forty bi-planes or twenty to thirty World War II size mono-planes. The Bearn was in the West Indies, when France fell in June 1940. It later joined the Free French and was used as a aircraft transport during the second half of World War II. In late 1939, the Bearn was used in the search for the pocket battleship Graf Spee, but never got close to that German raider. The Bearn never launched its airplanes on a combat mission, during World War II.
Source: Warships of World War II by Antony Preston
Well consider what Germany, Italy and France wanted out of their navies, the environment they operated in, and how that aligned with national policy.
Before going further it should be noted that there was nothing stopping Italy and France from building carriers in the 20's and 30's, nor Germany after the Anglo-German Naval Agreement in 1935.
Under the Washington Naval treaty both Italy and France were limited to 60k total tons of carriers and no 1 ship could be more than 27k tons, and Germany was only restricted to 35% the total tonnage of the RN under her agreement.
But what does a carrier accomplish? It is a tool for extending the range at which air power can be projected to both protect a fleet and to attack the enemy fleet.
But where were the French and Italians looking at fighting? The Mediterranean of course! And in the Med land based aircraft can cover the majority of the sea and the nice thing about an air strip is while it can move to escape, it also cant be sunk. Italy especially planned to make large usage of land based Naval Aviation. France too but budget and political instability meant they ended up badly behind in development. Italy also had more of a focus on military spending, but few large shipyards, a highly partisan high command, and a heavy need to prioritize.
However when war came other concurrent developments meant Italy suffered for her lack of organic carriers, Britain's willingness at times to use them aggressively, such as at Taranto, and general poor state of Italian Navy and aviation put her at a disadvantage.
However even then both nations did either operate or attempt to operate carriers.
The French converted the Battleship Bearn after WW1 to serve as an experimental ship to develop and learn and which carried off the French Gold reserves to safety and spent the war interned in Martinique, and in the late 30's ordered the Joffre class which would have been only slightly smaller than the Yorktowns though with a much smaller air group. However none were completed before the war.
Italy meanwhile in 1941 after seeing the potential of carriers, and the deficiencies of her land based aviation to protect the fleet at sea when it did sail(though offensively she still remained potent along with her German allies), began 2 conversion projects. The Aquila was a former ocean liner who was begun to be rebuilt in 1941, but was unfinished by the armistice Pic. Soon after another was attempted the Sparviero which would essentially have been the size of an escort carrier Pic but she too was unfinished.
Germany also had a convoluted history of carrier development. Initially they were intended to operate as true fleet carriers as part of the large fleet now allowed thanks to the AGNA and later Plan Z. The Graf Zeppelin Class was the initial attempt here, with 2 ships planned, each slightly under 20k tons. However more than almost any other fleet the Germans envisioned their carriers being capable surface combatants, allowing them to keep close company on breakouts and raids and fight for themselves. Work was stopped in 1940, but begun again after the loss of the Bismarck, Taranto, Prince of Wales/Repulse, Pearl harbor proved the need for a carrier both offensively and to defend other heavy ships when the enemy had aircraft in play.
Other attempts included converting the cruiser Seydlitz the captured French cruiser De Grasse and 2 merchant ships as the Jade class as escort carriers.
Aircraft Carriers of the World, 1914 to the Present. An Illustrated Encyclopedia by Roger Chesneau is a nice coffee table book with nice pictures and rather informative on the development across the globe of the carrier that I would recommend as an overview for general interest.