Did Japan really plan a surprise attack on the US?
A declaration of war, as it is referred to, was printed on the front page of Japan's newspapers in the evening edition of December 8, but not delivered to the US.
If the Japanese could not be troubled to ensure the prompt delivery of a document that in any case was not a declaration of war (no mention of hostilities) and fell short of being a legal technicality, for all intents and purposes it was intended as a surprise attack.
Japanese declaration of war
See also: Japanese declaration of war on the United States and the British Empire
The attack took place before any formal declaration of war was made by Japan, but this was not Admiral Yamamoto’s intention. He originally stipulated that the attack should not commence until thirty minutes after Japan had informed the United States that peace negotiations were at an end. The Japanese tried to uphold the 1907 Hague Convention III The Opening of Hostilities while still achieving surprise, but the attack began before the notice could be delivered. Tokyo transmitted the 5,000-word notification (commonly called the “14-Part Message”) in two blocks to the Japanese Embassy in Washington, but transcribing the message took too long for the Japanese ambassador to deliver it in time. (In fact, U.S. code breakers had already deciphered and translated most of the message hours before he was scheduled to deliver it.) The final part of the “14 Part Message” is sometimes described as a declaration of war. While it neither declared war nor severed diplomatic relations, it was viewed by a number of senior U.S government and military officials as a very strong indicator that negotiations were likely to be terminated  and that war might break out at any moment. A declaration of war was printed on the front page of Japan’s newspapers in the evening edition of December 8, but not delivered to the U.S. government until the day after the attack.
For decades, conventional wisdom held that Japan attacked without any official warning of a break in relations only because of accidents and bumbling that delayed the delivery of a document hinting at war to Washington. In 1999, however, Takeo Iguchi, a professor of law and international relations at International Christian University in Tokyo, discovered documents that pointed to a vigorous debate inside the government over how, and indeed whether, to notify Washington of Japan’s intention to break off negotiations and start a war, including a December 7 entry in the war diary saying, “our deceptive diplomacy is steadily proceeding toward success.” Of this, Iguchi said, “The diary shows that the army and navy did not want to give any proper declaration of war, or indeed prior notice even of the termination of negotiations ... and they clearly prevailed.”