# entry

guid: https://alexkrainer.substack.com/p/syria-will-it-prove-to-be-the-empires
title: Syria: will it prove to be the empire's final quagmire?
author: ;Alex Krainer
link: https://alexkrainer.substack.com/p/syria-will-it-prove-to-be-the-empires
hash: T�[�$��M)0U�F�m
content:
<p>On Sunday morning we woke up to the most surreal news: the regime of <strong>Bashar al-Assad</strong> in Syria is no more. From the day the new-and-improved Jabhat al-Nusra, now renamed Hayat Tahrir al-Sham (HTS), launched their attack on Syria (Wednesday, 27 November at 7:50 AM) to Sunday, 8 December 2024, only 11 days' time. In those 11 days,  Damascus fell and president Assad fled to Russia. The Syrian Arab Army (SAA) offered next to no resistance and HTS drove straight through Syria almost unopposed. </p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10334914-f502-4acf-8299-76c13def77f7_2115x1177.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10334914-f502-4acf-8299-76c13def77f7_2115x1177.png" width="1456" height="810" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/10334914-f502-4acf-8299-76c13def77f7_2115x1177.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":810,"width":1456,"resizeWidth":null,"bytes":3420611,"alt":"","title":null,"type":"image/png","href":null,"belowTheFold":false,"topImage":true,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" title="" fetchpriority="high" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a><figcaption data-sanitized-class="image-caption">West’s moderate head choppers in action</figcaption></figure></div><p>All of a sudden and seemingly out of nowhere, the already strategically defeated Western empire suddenly scored a brilliant victory and everything changed. The media and social networks are chock-full of stories about how this happened and explanations of why it happened this way. Supposedly Syria was too week, its troops too poorly paid, its leadership too corrupt to withstand the onslaught from Idlib.</p><p>The same Syria and its army under the same Bashar Al-Assad fought a concerted attack by Al Qaeda, ISIS, al-Nusra, Khorasan and other moderate head choppers supported by Turkey, US, UK and the whole Arab league.  They resisted for four long years, from 2011 until 2015, when Russia finally came to their rescue. The same Bashar al-Assad refused to flee Damascus back then. Since 2016, Syria had 8 full years to regroup, rearm and reinforce their defenses against the incursion which was fully expected.</p><h2>Syria folded with a stronger hand</h2><p>Not only that, in those past 8 years the circumstances changed quite substantially: until last Sunday, Syria was facing a much weaker West, a fractured Arab street (the Arab League, with the exception of Qatar was at least overtly supportive of the Assad regime). In 2011, Russia and Iran had a cold-to-hostile relationship but today they are in a close alliance and both were fully supportive of Syria. Furthermore, Iran and Saudi Arabia are no longer enemies and Iran has largely consolidated its dominance in the region. </p><p>The insurgency brewing under Turkish protection in Idlib wasn't a secret either. Iranian intelligence warned Assad and Syrian leadership months in advance that an attack was being prepared. HTS's leader <strong>Mohammad al-Golani</strong> made no secret that HTS's objective was not only Aleppo but Damascus itself. According to US reports, HTS &amp; friends have been attacking Syrian positions almost constantly since 2022 and SAA had heavily fortified positions capable of containing attacks from Idlib towards Aleppo. But when the attack came, they offered almost no resistance.</p><p>Keep in mind, the jihadi forces from Idlib counted between 20,000 and 30,000 troops. Syrian army counted nearly 270,000 troops. An invading force would have to outnumber the defending forces by a factor of 3:1 to overcome their resistance. As it was, the defenders outnumbered the attackers almost 10:1, were well equipped and well armed in fortified positions. This is the reason why the Israeli intelligence thought that Idlib incursion was a suicide mission.  SAA's best forces were concentrated in Hama, but when HTS attacked, Hama fell without a fight. </p><h2>Four beers to die defending your country</h2><p>Why did all of Syria fall without a fight? I suspect that many of the knee-jerk explanations circulating at present will prove wrong. The stories about poorly paid soldiers and corrupt commanders make as much sense as office fires bringing down steel frame towers. This simply can’t happen that way. </p><p>I served in the army during war and I remember that my salary was good to pay four beers out in the city. Regardless, I don’t recall a single conversation about whether our pay was enough for us to obey our orders. How and why the Syrian army vanished in 11 days’ time requires a better explanation. Either way, if I were sitting on the (currently) winning side, I'd be very worried by now: the only place you walk into this easily is a trap.</p><h2>The big picture: Syria and Ukraine are two parts of the same war</h2><p>Time will tell, but here are a few dots that might make coherent sense if connected. First off, the conflict in Syria is part of the same conflict that's also being fought in Ukraine. On 29 November in Astana (two days after HTS launched their incursion into Syria), <strong>Vladimir Putin</strong> said the following with regards to war/peace in Ukraine:</p><blockquote><p>"Let me underscore the key point - the essence of our proposal is not a temporary truce or ceasefire, as the West might prefer, to allow the Kiev regime to recover, rearm, and prepare for a new offensive. I repeat: we are not discussing freezing the conflict, but its definitive resolution."</p></blockquote><p>And what is Putin's definitive resolution? It's nothing less than the creation of a new security architecture between the "heartland and the rimland" to use <strong>Halford Mackinder</strong>'s terminology. In other words, Putin is determined to end British geopolitics once and for all. The following section is an excerpt from my upcoming book about the conflict in Ukraine and I believe it is fully relevant to the recent events in Syria.</p><h2>Squashing British geopolitics</h2><p>Today’s wars are driven by the Western imperial oligarchy as they struggle to maintain their dominance and to impose their “rules-based” global order. The central element of their agenda is an overarching imperative to preserve their hegemony over the Eurasian landmass. This long-held obsession draws roots from the British Empire. It was explicitly articulated at the turn of the last century by the British scholar and statesman <strong>Sir Halford Mackinder</strong>.</p><p>Following an extensive study of world history and geography, in 1904 Mackinder published a seminal paper titled, “The Geographical Pivot of History” in which he argued that the Empire’s exclusive focus on sea power was misguided and that the destiny of the world would be shaped by land powers. Mackinder hypothesized that the long-term viability of states therefore critically depended on their space and location and concluded that optimum conditions of space and location were only to be found in the inner regions of Eurasia which he named the <em>Pivot Area</em>: a large expanse roughly encompassing Russia, the Caucasus region, Kazakhstan, Iran, and Afghanistan. </p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27b18cba-c718-4534-988f-37f6d4b80239_1260x786.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27b18cba-c718-4534-988f-37f6d4b80239_1260x786.png" width="1260" height="786" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/27b18cba-c718-4534-988f-37f6d4b80239_1260x786.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":786,"width":1260,"resizeWidth":null,"bytes":1032785,"alt":"","title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" title="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><p>In Mackinder’s framework, the Pivot Area is surrounded by the Inner or Marginal Crescent which includes Europe, Northern Africa, Asia Minor, the Arabian Peninsula, India, China and Japan, while the lands of the Outer, or Insular Crescent included the rest of the world. For Mackinder and the British imperial cabal, the Pivot Area was strategic because it was capable of emerging as an independently viable economic power that could spawn a powerful rival empire. </p><p>The introduction of Trans-Siberian railway in 1904, facilitating improvements in the region’s internal communications and transport which the railway made possible, was seen as a major catalyst of this development, as well as a cause of alarm for the imperial cabal in London. </p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1fc4ca7-578c-4395-9057-2b562fba8d25_1217x829.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1fc4ca7-578c-4395-9057-2b562fba8d25_1217x829.png" width="1217" height="829" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/c1fc4ca7-578c-4395-9057-2b562fba8d25_1217x829.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":829,"width":1217,"resizeWidth":null,"bytes":1029328,"alt":"","title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" title="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><p>Russia was seen as the most likely nation to emerge as the pivot land power. Mackinder wrote as follows:</p><blockquote><p> “The spaces within the Russian empire and Mongolia are so vast, and their potentialities in population, wheat, cotton, fuel, and metals so incalculably great, that it is inevitable that a vast economic world, more or less apart, will develop inaccessible to oceanic commerce … In the world at large, [Russia] occupies the central strategical position held by Germany in Europe. She can strike on all sides, save the north. The full development of her modern railway mobility is merely a matter of time… The oversetting of the balance of power in favor of the <em>pivot </em>state, resulting in its expansion over the marginal lands of Euro-Asia, would permit of the use of vast continental resources for fleet-building, a<em>nd the empire of the world would then be in sight. This might happen if Germany were to ally herself with Russia.</em>”</p></blockquote><p>British Empire considered this to be an existential threat which had to be neutralized and destroyed. Mackinder proposed a solution to this challenge, which foreshadowed the century of British geopolitics:</p><blockquote><p>“The threat of such an event should, therefore, throw France into alliance with the over-sea powers, and France, Italy, Egypt, India and Korea would become so many <em>bridgeheads</em> where the outside navies would support armies to compel the pivot allies to deploy land forces and prevent them from concentrating their whole strength on fleets.”</p></blockquote><h2>Surrounding Russia with an arch of crises</h2><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63feaaae-e2fe-49b0-bb25-e10ff423b247_641x327.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63feaaae-e2fe-49b0-bb25-e10ff423b247_641x327.png" width="641" height="327" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/63feaaae-e2fe-49b0-bb25-e10ff423b247_641x327.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":327,"width":641,"resizeWidth":null,"bytes":172685,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a><figcaption data-sanitized-class="image-caption">The empire’s arch of crises</figcaption></figure></div><p>In plain English, Mackinder suggested surrounding the Pivot Area with a crescent of crisis flashpoints and inducing nations like France, Italy, Egypt, India and Korea to bait the pivot power (Russia) into an unending series of exhausting, crippling quagmires. His suggestions were taken entirely seriously and have defined the foreign policy of the Western empire ever since. </p><p>Over the ensuing decades, the exact geography of the designated flashpoints shifted somewhat with the changing geopolitical opportunities and Mackinder’s language and ideas evolved. For example, in 1919 he published the paper, “Democratic Ideals and Reality,” in which he renamed the Pivot Area as “the Heartland,” and spelled out its significance: “<em>Who rules East Europe commands the Heartland; who rules the Heartland commands the World-island; who rules the World-island controls the world.</em>"</p><p>Today, Ukraine and Syria (and Israel) make part of the rimland, or the "arch of crises" which the empire arranged from the Mediterranean to the Koreas in order to keep Russia and its allied powers constantly at war. Weakening these pivot power and preventing the emergence of a rival empire on Eurasian continent is an absolute imperative for the Western oligarchy. They will pursue it even at the cost of nuclear war against Russia. </p><p>Taking this “big picture” context into account, from Russia’s point of view, it could make sense to draw the empire into its final quagmire in Syria. After all, this is how the West destroyed the Soviet Union in the 1980s: not through a frontal war, but by drawing the USSR into a quagmire in Afghanistan. It was a clever gambit, but not really rocket science. And it worked.</p><p>The brilliant victory the west is now busy celebrating might even sedate the panic in the ruling establishment, enough for them to draw their fingers away from nuclear triggers and to pile assets into Syria to secure and defend the unexpected prize. But if the past is prologue, they’ve only won a Pyrrhic victory and already lost the war. The track record of the West’s cunning plans and dirty tricks is very consistent and predictive.</p><h2>Of cunning plans and dirty tricks</h2><p>Western powers seem to revel in their duplicity and treachery. They long lost their moral compass if they ever had one. Supposedly they once did, in the good old days, but the more you know about events behind the headlines, they more you realize that the only thing that's changed since those good old days is that today we have a far more granular picture of events. Sanitized news and sanctimonious proclamations are no longer taken at face value quite as readily as they once were.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ad3376f-6e80-4af7-a407-7e14d4d7a3b9_480x208.jpeg" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ad3376f-6e80-4af7-a407-7e14d4d7a3b9_480x208.jpeg" width="480" height="208" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/2ad3376f-6e80-4af7-a407-7e14d4d7a3b9_480x208.jpeg","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":208,"width":480,"resizeWidth":null,"bytes":null,"alt":"","title":"","type":null,"href":null,"belowTheFold":true,"topImage":true,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" title="" loading="lazy" fetchpriority="high" data-sanitized-class="sizing-normal"></picture><div></div></div></a></figure></div><p>Many are now openly celebrating evil - because Putin bad, Iranians bad, Assad bad, etc. Syria fell, not to the forces of democracy and freedom, but to hastily scotched-up brigades of certified head-chopping jihadi terrorists - the same ones that have slaughtered Syria's Christians by their thousands between 2011 and 2015.</p><p> Before 2011, Syria was home to about 2 million Christians who lived there in peace; today there are only abpit 300,000 and most likely there will be none left before this year is out. And the jihadis are equal opportunity, inclusive head choppers: they harbor the same warm regards toward Shia Muslims, Alawites and the Jews. But hey, Assad fell so hooray, what a brilliant victory for our side!! So clever, so cunning, so triumphant!</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6c82f49-3276-474d-86f5-1a172d5a980f_1512x780.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6c82f49-3276-474d-86f5-1a172d5a980f_1512x780.png" width="1456" height="751" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/a6c82f49-3276-474d-86f5-1a172d5a980f_1512x780.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":751,"width":1456,"resizeWidth":null,"bytes":2182973,"alt":"","title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" title="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a><figcaption data-sanitized-class="image-caption">Freedom and democracy under moderate head-choppers: so much to celebrate!</figcaption></figure></div><p>Incidentally, HTS - the new &amp; improved Al Nusra front - has been on the U.S. State Department's list of terrorist organizations since 2018. The organization's leader <strong>al-Jolani</strong> has been on the list of wanted terrorists since 2013 and still to this day has a $10 million bounty on his head. Now all of a sudden they're all jolly good fellows, and so say all of us!</p><h2>Mind the long-term trends!</h2><p>But even if our moral compass is irreparably broken, at least some vestige of practical common sense and a sensitivity to historical patterns should survive in sober minds. The U.S. once triumphantly entered Kabul, deposed the terrible, horrible, no good Taliban regime and took Afghanistan from them. Twenty years and $4 trillion later the invincible hegemon had to withdraw from there and surrender Afghanistan to the same terrible Taliban again. </p><p>In 2003 the U.S. triumphantly walked into Baghdad. Two decades later, U.S. troops are holed up in their bases like sitting ducks at the mercy of Iran and its proxies. Capturing and executing <strong>Saddam Hussein</strong> was also celebrated as some great milestone in the democratic transformation of the Middle East. In effect, the great hegemon handed Iraq over to the Iranians. Then in 2013 we celebrated the fall of the terrible, horrible, no good madman <strong>Ghaddafi </strong>in Libya. Yet another brilliant triumph of Western forces of democracy and freedom. Only, it blew back spectacularly.</p><p>Recall, one of the main sponsors of that project in addition to <strong>Lord David Cameron</strong> was French president <strong>Nicolas Sarkozy</strong>. Decapitating Libya was supposed to help secure French hegemony over her dependencies in north and west Africa. Today France barely has any dependencies there and now even Chad and Senegal are kicking them out. </p><p>And let’s not forget Ukraine! In February 2014 we overthrew Ukraine’s president Yanukovich, installed a proto-fascist junta, coerced them to launch the brutal Anti-Terror Operation against the Eastern oblasts and strung the Russians along with Minsk Agreements to gain time to weaponize the whole country for the coming war against Russia. So, so clever. So brilliantly cunning!</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd07551ae-c33d-4d76-b2d9-4ac4d92330c7_440x320.jpeg" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd07551ae-c33d-4d76-b2d9-4ac4d92330c7_440x320.jpeg" width="440" height="320" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/d07551ae-c33d-4d76-b2d9-4ac4d92330c7_440x320.jpeg","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":320,"width":440,"resizeWidth":null,"bytes":null,"alt":"","title":"","type":null,"href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" title="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><p>Sadly, a good chunk of the western audiences have come to regard bad faith craftiness, double-dealing and dirty tricks that score these short-term Pyrrhic victories as evidence of great strategic sophistication among the Western foreign policy establishments' ruling circles. Every uptick in geopolitics triggers loud cheering, trash talking and chest thumping while the long-term trendline is being conveniently ignored. </p><div data-attrs='{"url":"https://alexkrainer.substack.com/p/syria-will-it-prove-to-be-the-empires?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share","text":"Share"}' data-component-name="CaptionedButtonToDOM" data-sanitized-class="captioned-button-wrap"><div data-sanitized-class="preamble"><p data-sanitized-class="cta-caption">Thank you for reading! This post is public so feel free to share it.</p></div><p data-attrs='{"url":"https://alexkrainer.substack.com/p/syria-will-it-prove-to-be-the-empires?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share","text":"Share"}' data-component-name="ButtonCreateButton" data-sanitized-class="button-wrapper"><a href="https://alexkrainer.substack.com/p/syria-will-it-prove-to-be-the-empires?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share" data-sanitized-class="button primary"><span>Share</span></a></p></div><h2>The long descent from our unipolar moment</h2><p>So, what does that long-term trendline look like? Let's remember that in 1993 - more than 30 years ago - the U.S. adopted the Wolfowitz Doctrine named after its brilliant author, <strong>Paul Wolfowitz</strong>. The Doctrine was meant to enshrine and cement Western empire's unipolar moment, secure its "full spectrum dominance" and prevent any rival from emerging. It also inspired the "Project For the New American Century," (PNAC) which put forth essentially the same geopolitical objective: total dominance.</p><p>In 2004, another one of PNAC's brilliant alumni, <strong>Michael Ledeen</strong> suggested that, </p><blockquote><p>"every now and again the United States has to pick up a crappy little country and throw it against the wall just to prove we are serious." </p></blockquote><p>Lovely, but how'd that unipolar moment work out over the last 30 years? For all the crafty cunning, double dealing and dirty tricks, for all the cheating on NATO expansion, regime changes, Minsk Agreement deception, for all the invincibility of the finest fighting force in the history of the universe, and all the blinding brilliance of the West's strategic leadership, things didn't seem to work out all that good.</p><p>The unipolar moment is no more and Western powers have devolved to relying on certified terrorists to help them achieve their short-term Pyrrhic victories. Even while the loud cheering is still echoing, there is no reason to believe that the misadventure in Syria will be worth celebrating any more than Afghanistan, Iraq, Libya or Ukraine are. Sadly, rivers of blood will be spilled, all for opposite outcomes and unintended consequences.</p><div data-attrs='{"url":"https://alexkrainer.substack.com/subscribe?","text":"Subscribe","language":"en"}' data-component-name="SubscribeWidgetToDOM" data-sanitized-class="subscription-widget-wrap-editor"><div data-sanitized-class="subscription-widget show-subscribe"><div data-sanitized-class="preamble"><p data-sanitized-class="cta-caption">Alex Krainer's Substack is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><div data-sanitized-class="fake-input-wrapper"><div data-sanitized-class="fake-input"></div><div data-sanitized-class="fake-button"></div></div></div></div><p><strong><a href="http://linkedin.com/in/alex-sasha-krainer-0b74ab1a">Alex Krainer</a> – <a href="https://twitter.com/NakedHedgie">@NakedHedgie</a></strong> is the creator of <strong><a href="https://isystem-tf.com/">I-System Trend Following</a></strong> and publisher of daily <strong><a href="https://isystem-tf.com/trendcompass/">TrendCompass</a></strong> investor reports which cover over 200 financial and commodities markets. One-month test drive is always free of charge, <strong>no jumping through hoops to cancel</strong>. To start your trial subscription, drop us an email at <a href="mailto:TrendCompass@ISystem-TF.com">TrendCompass@ISystem-TF.com</a></p><blockquote><h4>NEW: Check out <a href="https://trendcompass.substack.com/">TrendCompass on Substack</a>!</h4></blockquote><p>For<strong> <a href="https://isystem-tf.com/solutions/u-s-investors/">US investors</a></strong>, we propose a trend-driven inflation/recession resilient portfolio covering a basket of 30+ financial and commodities markets. Further information is at <a href="https://isystem-tf.com/solutions/u-s-investors/">link</a>.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09620c78-0881-42bb-8486-6af53ecdcc73_1027x553.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09620c78-0881-42bb-8486-6af53ecdcc73_1027x553.png" width="1027" height="553" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/09620c78-0881-42bb-8486-6af53ecdcc73_1027x553.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":553,"width":1027,"resizeWidth":null,"bytes":1140235,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><p></p>

attributes:
{"enclosures":[{"url":"https://api.substack.com/feed/podcast/153121288/9eef6176c3a238f6edd480fae25c58b8.mp3","type":"audio/mpeg","length":0}]}


guid: https://htmhell.dev/adventcalendar/2024/15/
title: The Gift You Do NOT Want: A Div in a Button's Clothing
author: ;Manuel Matuzovic
link: https://htmhell.dev/adventcalendar/2024/15/
hash: lx�$�]_�N��Vs�B
attributes: {"enclosures":[]}
content:
by Corina Murg<br><p>With the right CSS makeup and a click event, almost anything can pretend to be a button. In accessibility work, we spot these fakes and fix them, but teaching others why and how to do it is just as important. It’s not just about correcting a single mistake; it’s about introducing developers to accessibility concepts and approaches that they can comfortably return to and reuse across all their projects. More importantly, it encourages them to think beyond the sighted user with a mouse and consider the needs of those who rely on assistive technologies.</p>
<h2 data-sanitized-id="really-how-bad-can-a-fake-button-be?!">Really, How Bad Can a Fake Button Be?!</h2>
<p>So, how do we answer this question? I used to demo the problems using a screen reader, but I've found that it can be overwhelming for developers new to accessibility. I prefer now a different approach, using simpler tools: the keyboard and the accessibility tree. They are easy to pick up and give developers a good feel for what’s really going on.</p>
<p>No, the message is not to avoid screen readers, but to start with tools that have a gentler learning curve. The tree itself gives developers plenty of clues about how each node may (or may not!) be recognized by assistive tech like screen readers or voice recognition software. And for whatever the tree can’t reveal, keyboard testing can fill in some of the gaps.</p>
<p>Of course, no tool is perfect, and the accessibility tree does have its limitations. It’s important that we remind developers of them as well. So, what exactly does this approach entail?</p>
<h2 data-sanitized-id="build-a-genuine-button-with-a-lessbuttongreater">Build a Genuine Button with a <code>&lt;button&gt;</code></h2>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>button</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>button<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>button one<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    Change Color ONE</span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<pre data-sanitized-class="language-javascript"><code data-sanitized-class="language-javascript"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token keyword">function</span> <span data-sanitized-class="token function">changeColor</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token parameter">event</span><span data-sanitized-class="token punctuation">)</span> <span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token keyword">const</span> element <span data-sanitized-class="token operator">=</span> event<span data-sanitized-class="token punctuation">.</span>currentTarget<span data-sanitized-class="token punctuation">;</span> </span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token keyword">const</span> currentColor <span data-sanitized-class="token operator">=</span> <span data-sanitized-class="token function">getComputedStyle</span><span data-sanitized-class="token punctuation">(</span>element<span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">.</span>backgroundColor<span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line">    element<span data-sanitized-class="token punctuation">.</span>style<span data-sanitized-class="token punctuation">.</span>backgroundColor <span data-sanitized-class="token operator">=</span> currentColor <span data-sanitized-class="token operator">===</span> <span data-sanitized-class="token string">'rgb(0, 128, 0)'</span> <span data-sanitized-class="token operator">?</span> <span data-sanitized-class="token string">'rgb(58, 58, 242)'</span> <span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token string">'rgb(0, 128, 0)'</span><span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span></span><br><span data-sanitized-class="highlight-line"></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token keyword">const</span> buttonOne <span data-sanitized-class="token operator">=</span> document<span data-sanitized-class="token punctuation">.</span><span data-sanitized-class="token function">querySelector</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token string">'.button.one'</span><span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line">buttonOne<span data-sanitized-class="token punctuation">.</span><span data-sanitized-class="token function">addEventListener</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token string">'click'</span><span data-sanitized-class="token punctuation">,</span> changeColor<span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">;</span></span></code></pre>
<p>First, we create a genuine button using the <code>&lt;button&gt;</code> tag, and then examine how it appears in the accessibility tree. We focus on the attributes and properties exposed for this node, discussing what each one means in terms of interaction with assistive technologies. At every step, we also test with a keyboard.</p>
<p>Note: I regularly work on a Windows computer and am familiar with the accessibility tree in both Firefox and Chromium browsers. For this exercise, I’ll mostly use Firefox since it offers some clues about the shortcomings of fake buttons.</p>
<img src="https://htmhell.dev/adventcalendar/2024/15/images/Firefox-SemanticButton.jpg" alt="accessibility tree within Firefox's developer tools, highlighting the properties of a button element built with a button tag" width="500" aspect-ratio="658/693" loading="lazy">
<p>So, what is the view from the accessibility tree revealing?</p>
<ul>
<li>
<p>The node has the role <code>button</code>, which comes with some privileges: it will be announced as a button by a screen reader, and since buttons support name from content, its text becomes its <code>accessible name</code>. So, a screen reader will announce it as <code>Change Color ONE, button</code>. Users relying on voice recognition software can activate it by voice command, such as saying <code>Click Change Color One</code>.</p>
</li>
<li>
<p>The <code>states</code> array shows that the button is focusable, so we know we can reach it via the <code>tab</code> key.</p>
</li>
</ul>
<p>But where does the keyboard come in? It helps us confirm the <code>focusable</code> property by allowing us to navigate to the button with the <code>tab</code> key. Plus, it confirms that we can activate the button using the <code>Enter</code> key or the <code>Space</code> bar, another built-in perk of genuine buttons that is not immediately obvious from the accessibility tree.</p>
<p>Next step: build a fake button.</p>
<h2 data-sanitized-id="build-a-fake-button-with-a-lessdivgreater">Build a Fake Button with a <code>&lt;div&gt;</code></h2>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>button two<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    Change Color TWO</span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<pre data-sanitized-class="language-javascript"><code data-sanitized-class="language-javascript"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token keyword">const</span> buttonTwo <span data-sanitized-class="token operator">=</span> document<span data-sanitized-class="token punctuation">.</span><span data-sanitized-class="token function">querySelector</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token string">'.button.two'</span><span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line">buttonTwo<span data-sanitized-class="token punctuation">.</span><span data-sanitized-class="token function">addEventListener</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token string">'click'</span><span data-sanitized-class="token punctuation">,</span> changeColor<span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">;</span></span></code></pre>
<p>We simply attach a click event to a <code>div</code>, and with nearly the same CSS as we’d use for a genuine button, we create something a sighted user will recognize as a button.</p>
<p>Here’s the view from Firefox’s accessibility tree:</p>
<img src="https://htmhell.dev/adventcalendar/2024/15/images/Firefox-FakeButtonNotFixed.jpg" alt="accessibility tree within Firefox's developer tools, highlighting the properties of a div element used as a button" width="500" aspect-ratio="660/729" loading="lazy">
<p>What should we be looking or testing for? The same attributes and behaviors we found for the genuine button:</p>
<ul>
<li>role,</li>
<li>name,</li>
<li>focusable property, and</li>
<li>keydown and keyup events.</li>
</ul>
<p>The node’s role defaults to <code>generic</code> since the building block is a <code>div</code>. It also remains unnamed because generic nodes don’t have naming privileges, despite containing text. Keyboard users will not reach it, let alone activate it, and we don’t even have to test with a keyboard to prove it. We simply notice that the <code>states</code> array does not list the <code>focusable</code> property.</p>
<p>Once we make it focusable by adding a <code>tabindex="0"</code> we notice something else: we can't activate it with the <code>Enter</code> key or the <code>Space</code> bar. Is this lack of functionality reflected in the accessibility tree as well? Sort of. The genuine button lists a <code>Press</code> event under the <code>actions</code> property, while the fake button only shows <code>Click</code>. But more on that later.</p>
<p>Firefox is also explicitly warning us about the lack of focus and "interactive semantics", and it's connecting us to MDN for more information. So, what are we still missing? We need:</p>
<ul>
<li>a <code>keydown</code> event for activation via <code>Enter</code>,</li>
<li>a <code>keyup</code> event for activation via <code>Space</code>, and</li>
<li>a <code>button</code> role to have it announced properly by screen readers, and also to assign it a name based on its content.</li>
</ul>
<p>Here's what the HTML would look like with all the additions:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>button two<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">role</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>button<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">tabindex</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>0<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    Change color TWO</span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>while the JavaScript would have to include the following as well:</p>
<pre data-sanitized-class="language-javascript"><code data-sanitized-class="language-javascript"><span data-sanitized-class="highlight-line">buttonTwo<span data-sanitized-class="token punctuation">.</span><span data-sanitized-class="token function">addEventListener</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token string">'keydown'</span><span data-sanitized-class="token punctuation">,</span> <span data-sanitized-class="token keyword">function</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token parameter">event</span><span data-sanitized-class="token punctuation">)</span> <span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token keyword">if</span> <span data-sanitized-class="token punctuation">(</span>event<span data-sanitized-class="token punctuation">.</span>key <span data-sanitized-class="token operator">===</span> <span data-sanitized-class="token string">'Enter'</span><span data-sanitized-class="token punctuation">)</span> <span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">        event<span data-sanitized-class="token punctuation">.</span><span data-sanitized-class="token function">preventDefault</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line">        <span data-sanitized-class="token function">changeColor</span><span data-sanitized-class="token punctuation">(</span>event<span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token punctuation">}</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span><span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line"></span><br><span data-sanitized-class="highlight-line">buttonTwo<span data-sanitized-class="token punctuation">.</span><span data-sanitized-class="token function">addEventListener</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token string">'keyup'</span><span data-sanitized-class="token punctuation">,</span> <span data-sanitized-class="token keyword">function</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token parameter">event</span><span data-sanitized-class="token punctuation">)</span> <span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token keyword">if</span> <span data-sanitized-class="token punctuation">(</span>event<span data-sanitized-class="token punctuation">.</span>key <span data-sanitized-class="token operator">===</span> <span data-sanitized-class="token string">' '</span><span data-sanitized-class="token punctuation">)</span> <span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">        event<span data-sanitized-class="token punctuation">.</span><span data-sanitized-class="token function">preventDefault</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line">        <span data-sanitized-class="token function">changeColor</span><span data-sanitized-class="token punctuation">(</span>event<span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token punctuation">}</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span><span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">;</span></span></code></pre>
<p>For developers it might seem tempting to add these missing features one by one. The advice, of course, is that the simpler and more robust solution is to replace the <code>&lt;div&gt;</code> with a <code>&lt;button&gt;</code>. However, for the sake of exploring what the accessibility tree reveals — or fails to! — and the importantce of manual testing, we’ll go ahead and add all the necessary code to make this <code>div</code> fully functional.</p>
<h2 data-sanitized-id="the-accessibility-tree-can-only-do-so-much">The Accessibility Tree Can Only Do So Much</h2>
<p>Is the retrofitted <code>div</code> recognized as a button now? Yes. It has the role <code>button</code>, it has a name, and it's focusable.</p>

<img src="https://htmhell.dev/adventcalendar/2024/15/images/Firefox-FakeButtonFixed.jpg" alt="accessibility tree within Firefox's developer tools, highlighting the properties of button built with a div tag" width="500" aspect-ratio="658/693" loading="lazy">
<p>Is the retrofitted button's tree view different in any way from the one of the genuine button? Yes again.</p>
<p>First, the <code>DOMNode</code> property reminds us that we started with a div. Next, something curious happens within the <code>actions</code> array.</p>
<p>Since we’ve added the <code>keydown</code> and <code>keyup</code> events we would not expect any differences between the <code>actions</code> arrays of the two buttons, right? Wrong. The updated view still shows <code>Click</code> instead of <code>Press</code>. It seems that manually adding the keyboard events does not change the action keyword. But is this a Firefox oversight, or just a subtle dig at fake buttons? Just kidding!</p>
<p>It's worth noting that the Chromium browsers also take the approach of differentiating between the two buttons. They do not display this information as part of the accessibility tree, but separately, under the <code>Event Listeners</code> tab in DevTools. For the genuine button, their keyword of choice is <code>click</code> and not <code>Press</code>, but then, just like Firefox, they treat the div button differently. When keyboard events are explicitly added, Chromium’s event listeners include <code>click</code> along with <code>keydown</code> and <code>keyup</code>.</p>
<img src="https://htmhell.dev/adventcalendar/2024/15/images/Chrome-FakeButtonFixedEvents.jpg" alt="accessibility tree within Chrome's developer tools, highlighting a button built with a div tag. Click, keydown and keyup are listed under event listeners" width="500" aspect-ratio="670/258" loading="lazy">
<p>The Chromium behavior makes sense: when we attach a click handler to a native button, it automatically works for all input methods (mouse, touch, keyboard). That's why it only shows one <code>click</code> listener linking to one particular function. For the div button, since we manually added separate keyboard handlers, DevTools shows links to all three function implementations - one for click and two for keyboard events.</p>
<p>But enough nerding over keywords and browser inconsistencies, as interesting as this detective work might be. The point to make is that on keyboard interactions the browsers send mixed signals, and that testing, in this case keyboard testing, is irreplaceable. (Is this my subtle way of turning your attention away from the fact that I don't have (yet!) an explanation about these inconsistencies? Totally! I've spent time poking around the Firefox and Chromium codebases, but so far the answer remains a mystery.)</p>
<p>Let's end with a keyboard interaction anomaly that only keyboard testing could reveal: while theoretically both buttons are now fitted with proper keyboard support, there's an important difference in how they handle the <code>keyup</code> event. The benefit of a <code>keyup</code> event is that the user can cancel the action on a button. They can press <code>Space</code>, change their mind, move focus away with <code>Tab</code>, and release <code>Space</code> without triggering the button. When we build our own button from a div, we need extra code to track whether the <code>Space</code> key was initially pressed while focused on that button. Without this check, it would <a href="https://codepen.io/Cor-Ina/pen/OPLJYry">incorrectly activate when receiving focus</a> while <code>Space</code> is being released, even if <code>Space</code> was originally pressed on a different element. And while we add more code to our creation, the browsers will, of course, take good care of the genuine button and gracefully ignore Space keyup events that don't belong to it.</p>


<h3 data-sanitized-id="takeaways-for-developers">Takeaways for Developers</h3>
<ol>
<li>
<p>Semantic HTML is powerful. Always consider it first.</p>
</li>
<li>
<p>No tool is perfect, and the accessibility tree and the DevTools in general are no exception. Testing is key. In our particular case, testing with the keyboard is enough, but in other scenarios testing with a screen reader will be necessary. In general, accessibility requires a holistic approach and that we select tools and tests based on the specific functionality we are assessing.</p>
</li>
</ol>
<h2 data-sanitized-id="wrapping-up">Wrapping Up</h2>
<p>Does this approach work? At the minimum, it introduces developers to the accessibility tree and reinforces the usefulness of a familiar tool, the ubiquitous keyboard. If it ends with "Now I know I shouldn't just add a click event to a div" then yes, it does work.</p>
<p>From experience, it can sometimes make developers nervous about their ability to choose the right tools or worry about overlooking crucial details. This is still a win. It shows that they care. If you've had any accessibility mishaps in your past, this might be actually a good moment to reveal them, and prove that progress is possible. If you've had none, feel free to use one of mine: before I started using screen readers, I used to add a <code>tabindex</code> to headings.</p>
<p>What should we encourage developers to focus on, no matter their initial reaction? Know their HTML, consider the needs of different types of users, lean into testing. And ask questions.</p>


guid: https://htmhell.dev/adventcalendar/2024/16/
title: You don’t need the isOpen class
author: ;Manuel Matuzovic
link: https://htmhell.dev/adventcalendar/2024/16/
hash: �&�`14�l�50'��.
attributes: {"enclosures":[]}
content:
by Maureen Holland<br><p>Don’t get me wrong. You can keep it if you like it. But you don’t <em>need</em> it.</p>
<p>A class selector can allow us to visually show or hide content for disclosure widgets, like a custom select component or dropdown navigation menu. But a disclosure widget is made of two parts:</p>
<ol>
<li>A button that controls show/hide behaviour</li>
<li>Related content that is shown or hidden <em>depending on the button state</em></li>
</ol>
<p>Whether the <code>isOpen</code> class is applied or not, a screenreader would announce this button as <strong>"Click me!, button"</strong>.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span>Click me!<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>p</span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>isOpen<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Content that displays depending on a conditionally applied class.<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>p</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>One of the principles of web accessibility is to be perceivable. That means not relying exclusively on one sense, like sight, to provide information. In the above case, if I can’t see the content being shown or hidden, how do I know my button click did anything?</p>
<p>We <em>need</em> a corresponding semantic update to indicate what happened. This is what the <code>aria-expanded</code> attribute provides.</p>
<p>The following button would read: <strong>"Click me!, expanded, button"</strong>.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>button</span> <span data-sanitized-class="token attr-name">aria-expanded</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>true<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Click me!<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>p</span><span data-sanitized-class="token punctuation">&gt;</span></span>Content that displays depending on button's expanded state.<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>p</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>This one would be <strong>"Click me!, collapsed, button"</strong>.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>button</span> <span data-sanitized-class="token attr-name">aria-expanded</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>false<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Click me!<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>p</span><span data-sanitized-class="token punctuation">&gt;</span></span>Content that displays depending on button's expanded state.<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>p</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>The <code>aria-expanded</code> attribute also provides a ready-made CSS selector for collapsed and expanded states. So, we don’t need to add an <code>isOpen</code> class at all.</p>
<p>If you’ve used the <code>:checked</code> pseudo-class before, you’ll be familiar with the idea of styling scoped to a particular state. It’s a good idea. As a bonus, you get a mini accessibility test in your CSS! The styles only apply if the semantics are correct.</p>
<pre data-sanitized-class="language-css"><code data-sanitized-class="language-css"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token selector">button[aria-expanded="false"] + *</span> <span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line"> <span data-sanitized-class="token comment">/* collapsed content styles here */</span></span><br><span data-sanitized-class="highlight-line"> <span data-sanitized-class="token property">display</span><span data-sanitized-class="token punctuation">:</span> none<span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span></span><br><span data-sanitized-class="highlight-line"></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token selector">button[aria-expanded="true"] + *</span> <span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line"> <span data-sanitized-class="token comment">/* expanded content styles here */</span></span><br><span data-sanitized-class="highlight-line"> <span data-sanitized-class="token property">display</span><span data-sanitized-class="token punctuation">:</span> block<span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span></span></code></pre>
<p>I first learned of this technique through <a href="https://inclusive-components.design/collapsible-sections/">Heydon Pickering’s Inclusive Components</a> and have been using it ever since. It’s simple, effective, and a great way to keep accessibility in mind at every stage of development.</p>
<p data-sanitized-class="highlight">
<strong>Note:</strong> You will not need <code>aria-expanded</code> on the HTML <code>details</code> element. Stateful information is automatically provided through its <code>open</code> attribute. <a href="https://www.scottohara.me/blog/2022/09/12/details-summary.html">See Scott O’Hara for more details on <code>details</code></a>.
</p>


guid: https://odysee.com/peace-roundtable-8-the-world-in-review:c77fb88469c5ef1dd714789645de0411f44f1bc8
title: Peace Roundtable #8: The World in Review f. Harley Schlanger, Alex Krainer and Larry Johnson
author: ;Rising Tide Foundation
link: https://odysee.com/peace-roundtable-8-the-world-in-review:c77fb88469c5ef1dd714789645de0411f44f1bc8
hash: �Q~����Nn�3c5y$
content:
<p><img src="https://thumbnails.lbry.com/glHb_6-Azkg" width="480" alt="thumbnail" title="Peace Roundtable #8: The World in Review f. Harley Schlanger, Alex Krainer and Larry Johnson"></p>Dr. Edward Lozansky and Matt Ehret host The Academy for International Cooperation's Peace Roundtable #8 featuring critical insights on the nature of the existential crises facing humanity as we end 2024 and both the dangers and opportunities going into 2025.<br><br>Special guests include: Harley Schlanger (representative of The Schiller Institute), Alex Krainer (Founder, Trend Compass) and Larry Johnson (former CIA Analyst and member of Veteran Intelligence Professionals for Sanity).<br><br>Here's Cynthia's study with links to the original text by Schiller https://cynthiachung.substack.com/cp/152052946<br><br>An introduction to the Verona Eurasian Forum can be found here:<br>https://pluralia.forumverona.com/en/a/verona-eurasian-economic-forum-freedom-of-expression-tolerance-mutual-respect/<br><br>Visit Pluralia here: https://pluralia.forumverona.com/en/<br><br>Support the Rising Tide Foundation in the following ways:<br><br>1) Make a donation <br>https://risingtidefoundation.net/support-the-work/<br>2) Subscribe to Matt and Cynthia's Substack<br>matthewehret.substack.com<br>cynthiachung.substack.com<br>3) Buy some books!<br>https://canadianpatriot.org/untold-history-of-canada-books/<br><br>and follow us on www.risingtidefoundation.net and t.me/risingtidefoundation<br>...<br>https://www.youtube.com/watch?v=glHb_6-Azkg

attributes:
{"enclosures":[{"url":"https://player.odycdn.com/api/v3/streams/free/peace-roundtable-8-the-world-in-review/c77fb88469c5ef1dd714789645de0411f44f1bc8/5a6005.mp4","type":"video/mp4","length":814724354}]}


guid: https://antonchaitkin.substack.com/p/harding-fights-for-the-constitution
title: Harding Fights for the Constitution
author: ;Anton Chaitkin
link: https://antonchaitkin.substack.com/p/harding-fights-for-the-constitution
hash: b�x5���t�����#
content:
<div><img src="https://substackcdn.com/image/fetch/w_1200,h_600,c_fill,f_jpg,q_auto:good,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F754f34fa-4bb3-488a-815f-79642741917b_2542x2557.jpeg" data-sanitized-class="ff-og-image-inserted"></div><h3 data-sanitized-class="subtitle">By Anton Chaitkin; Copyright Anton Chaitkin</h3><div dir="auto" data-sanitized-class="body markup">
<h1 data-sanitized-class="header-anchor-post">Harding Fights for the Constitution</h1>
<div data-sanitized-class="pencraft pc-display-flex pc-alignItems-center pc-position-absolute pc-reset header-anchor-parent">
<div data-sanitized-class="pencraft pc-display-contents pc-reset pubTheme-yiXxQA">
<div data-sanitized-id="§harding-fights-for-the-constitution" data-sanitized-class="pencraft pc-reset header-anchor offset-top">
<h1 data-sanitized-class="header-anchor-post"><button tabindex="0" type="button" data-href="https://antonchaitkin.substack.com/i/153180832/harding-fights-for-the-constitution" data-sanitized-class="pencraft pc-reset pencraft iconButton2-DvFP7w iconButtonBase-dJGHgN buttonBase-GK1x3M buttonNew-KfJF0Q size_sm-G3LciD priority_secondary-S63h9o"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></button></h1>
</div>
</div>
</div>
<p>By Anton Chaitkin; Copyright Anton Chaitkin</p>
<p>It is time to revive the name and vindicate the memory of Warren G. Harding, the Republican President of the United States, 1921-1923.</p>
<p>Harding fought for his country and for civilization. He died fighting for national sovereignty, for improved living standards, and for peace.</p>
<p>He…</p>
</div>

attributes:
{"enclosures":[{"url":"https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https://substack-post-media.s3.amazonaws.com/public/images/754f34fa-4bb3-488a-815f-79642741917b_2542x2557.jpeg","type":"image/jpeg"}]}


guid: https://alexkrainer.substack.com/p/the-magic-essence-of-economic-development
title: The magical essence of economic development
author: ;Alex Krainer
link: https://alexkrainer.substack.com/p/the-magic-essence-of-economic-development
hash: ��Y�K����":L��(
content:
<p>The ongoing decline of Germany is gradually reversing one of the world's most remarkable economic success stories. The standard explanations of this sad development usually include criticism of the incompetent government, pursuit of net zero policies and sustaining collateral damage in the empire's war against Russia. All these explanations contain an element of truth, but what's usually missing from such discussions are the secrets of Germany's success.</p><p>Up until about ten years ago, Germany was the world's No. 1 exporting superpower. But contrary to what one might assume, most of Germany's exports were not products of known and recognized brands like Bosch, Mercedes or BMW. More than 50% of German exports were products and services developed by her (once) burgeoning small and medium-sized enterprises, most of them companies you may have never heard of. But such businesses were the engine of German industrial dynamism.</p><h2>Home of the hidden champions</h2><p>In a YouTube video titled, "<a href="https://www.youtube.com/watch?v=8FT-zyTX2nE&amp;pp=ygUnY29udmVyc2F0aW9ucyB3aXRoIHByb2YuIHJpY2hhcmQgd2VybmVy">Conversation with Professor </a><strong><a href="https://www.youtube.com/watch?v=8FT-zyTX2nE&amp;pp=ygUnY29udmVyc2F0aW9ucyB3aXRoIHByb2YuIHJpY2hhcmQgd2VybmVy">Richard Werner</a></strong>," Dr. Werner explains the phenomenon. Germany was the home base of the world's largest number of hidden "champions" - market leaders that occupied either first, second or third spot in terms of the global market share of whatever product or service they produced. Some 1,500 German firms qualified as market champions. </p><p>For perspective, the distant second in terms of number of market champions was the U.S.A. which has about 300 such companies. So, how did Germany create fully 1,500 market champions? We always heard stories about the excellence of German engineering and the well educated and disciplined workforce, etc. But those are children's tales that miss the mark and explain nothing.</p><h2>Banking as a public utility</h2><p>Rather, as Werner explained it, the secret of Germany's success, which has had a 200-year continuity in spite of suffering through biblical crises over this period, is in her banking system which Werner said was the best in the world. American economist Michael Hudson also wrote extensively about German industrial banking. Germany had the largest number of banks in Europe: about 1,500 small, local banks. </p><p>Fully 70% of these banks were non-profit community banking institutions. Their core business was funding local small and medium-sized enterprises. They tended to have close relationships with their clients and actively participated in their business development, helping them fund and organize their operations and finances, break into new markets and network with other, similar businesses. It was not uncommon in Germany for local banking institutions to extend 100-year loans to their clients.</p><h2>The magic is us (+ credit)</h2><p>I think I’m not alone when I say that I must have witnessed dozens, perhaps hundreds of enthusiastic conversations among friends about this or that business idea – something that would make sense and be successful; something they knew they could do if they had the money to get it off the ground… Sadly, all too often that entrepreneurial spark is extinguished for the lack of funding.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13c05542-b49d-41f3-9188-109c44a3a084_2575x1189.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13c05542-b49d-41f3-9188-109c44a3a084_2575x1189.png" width="1456" height="672" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/13c05542-b49d-41f3-9188-109c44a3a084_2575x1189.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":672,"width":1456,"resizeWidth":null,"bytes":6485950,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><p>But with ample credit at favorable terms, family businesses could develop their products and services and find markets for them. The family's second and third generations, educated with advanced degrees in engineering, design, chemistry or biotechnology could refine and perfect the company's offerings and thus gain a competitive advantage over their worldwide rivals who did not benefit from such a fertile and beneficial environment and could not confidently make long-term commitments to the development of their business. </p><p>Ultimately, creating a favorable environment for the development of small banking institutions and incentivizing them to provide long-term funding for the development of SMEs in their own regions is what policy makers could and should do to kick-start the engine of economic development. It amounts to simply empowering the individuals with the <em>will to do and a soul to dare</em> with the support they need to get started.</p><p>This is actually a fairly well understood concept and should be pursued by any sovereign democracy. This principle is consistent across the world. In a 2019 article, <strong>Eric Peters</strong> of One River Asset Management recounted a discussion with a Japanese colleague and a former central banker. He said that, “The dynamism in Japan’s economy is not to be found in the conglomerates. To find the really interesting companies you must look at the small and mid-sized firms that supply the large players – they’re the ones where you find the creativity, the risk takers, the innovators.”</p><p>The world over, based on the data from some 70 different nations, it emerges that SMEs are the main job creators: up to 80% of all jobs are created by SMEs. They also create the right kind of economic dynamism because, unlike large systems, SMEs create the needed, productive jobs and foster efficiency, innovation and competitive advantage. Collectively, they generate a nation's wealth. By contrast, the large, zombified corporations tend to generate state dependency, kill innovation and dynamism and create what <strong>David Graeber</strong> called, "bullshit jobs." </p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c8d878-62fc-4551-8c12-d55c9f72c9bb_960x587.jpeg" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c8d878-62fc-4551-8c12-d55c9f72c9bb_960x587.jpeg" width="960" height="587" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/15c8d878-62fc-4551-8c12-d55c9f72c9bb_960x587.jpeg","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":587,"width":960,"resizeWidth":null,"bytes":null,"alt":"Picture background","title":null,"type":null,"href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="Picture background" title="Picture background" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><p>Having a large number of successful SMEs also gives an economy a certain resilience through economic or financial crises: even in tough times, commitment at family owned SMEs remains high, downsizing limited and cohesion strong. Family-owned SMEs don't slave to quarterly earnings statements and they won't move their operations to another nation as readily as large corporations will. Regional rootedness of SMEs also creates the local wealth effect. </p><p>Their owners and workers tend to have roots in their own communities; they eat food and drink water locally; travel on local roads, send their children to local schools, sports clubs and cultural centers, use local doctors and local dentists and frequent local social events. This all fortifies a community spirit and the commitment to creating safe and beautiful living spaces and continuously improving the life of that community</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff09f93e4-6721-44ef-960f-96dd546aa6df_2143x1225.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff09f93e4-6721-44ef-960f-96dd546aa6df_2143x1225.png" width="1456" height="832" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/f09f93e4-6721-44ef-960f-96dd546aa6df_2143x1225.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":832,"width":1456,"resizeWidth":null,"bytes":6489979,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a><figcaption data-sanitized-class="image-caption">Why shouldn’t everywhere we live be beautiful?</figcaption></figure></div><p>This could have a real and durable effect, as opposed to hollow corporate virtue signalling for PR-purposes while every other consideration is subordinated to the tyranny of quarterly income statements (and therefore not a penny can be spent on anything that could reduce the corporation's profits and clip its share price).</p><p>Given that we actually know all this (not that it is being widely discussed), and that we know that our developed economies are phenomenally productive, it becomes harder to explain why Germany should now be in an economic decline. Indeed, why should any nation be in economic decline? The answers point to the global economic predator class, the moneylending oligarchy controlling the GSIBs, or Global Systemically Important Banks. </p><h2>Sovietization of Europe’s banking industry</h2><p>In the case of Germany, beyond the current government's misadventure with Project Ukraine and their commitment to Global Goals and net zero policies, the foundations of German economic success have been under a deliberate and sustained attack by the European Central Bank which has been on a mission of consolidating the banking industry and destroying small local and regional banks. </p><p>Across the EU, the ECB has thus far culled some 6,000 small banks, in many cases depriving Europe's SME's of their financial lifeline. We might also ask why the IMF's structural adjustments consistently move their client economies farther away from sustainable economic development and prosperity.</p><p>These are not accidents of incompetent leadership. The principles I summarized above are well understood by top level policy makers - or they should be. What we are experiencing is a deliberate demolition of Germany’s and Europe's economy. Our next question should be, why? To what end? Unfortunately, because they won't tell us, we have to try to deduct an explanation ourselves. The conversation continues…</p><div data-attrs='{"url":"https://alexkrainer.substack.com/subscribe?","text":"Subscribe","language":"en"}' data-component-name="SubscribeWidgetToDOM" data-sanitized-class="subscription-widget-wrap-editor"><div data-sanitized-class="subscription-widget show-subscribe"><div data-sanitized-class="preamble"><p data-sanitized-class="cta-caption">Alex Krainer's Substack is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><div data-sanitized-class="fake-input-wrapper"><div data-sanitized-class="fake-input"></div><div data-sanitized-class="fake-button"></div></div></div></div><h2>A worthy project in search of support</h2><p>Speaking of funding investment projects and of predatory oligarchs, journalist and author <strong>Roman Latković</strong> has asked for help with his documentary project, <em>Kenya’s Roots of Love: Orphans, Elephants, and Trees.</em> Set in Kenya, it highlights the recovery of orphans and baby elephants, reforestation efforts, and the resilience of the Maasai community. Kibera, Nairobi’s largest slum—and the hometown of award-winning cinematographer <strong>Timothy Mwaura</strong>—reveals the toll oligarchs take, draining a nation’s wealth and energy. Roman is seeking investors and partners passionate about social impact and powerful storytelling. For anyone inclined to explore further or contribute to this project, please see below:</p><p><a href="https://elephantrees.com/">Project Overview</a><br><a href="https://elephantrees.com/investors.pdf">Investor Proposal</a></p><p>The project is supported by a 501(c)(3) fiscal sponsor, offering U.S. contributors tax-deductible options. For PayPal or wire transfer details, contact Roman directly.</p><p></p><p><strong><a href="http://linkedin.com/in/alex-sasha-krainer-0b74ab1a">Alex Krainer</a> – <a href="https://twitter.com/NakedHedgie">@NakedHedgie</a></strong> is the creator of <strong><a href="https://isystem-tf.com/">I-System Trend Following</a></strong> and publisher of daily <strong><a href="https://isystem-tf.com/trendcompass/">TrendCompass</a></strong> investor reports which cover over 200 financial and commodities markets. One-month test drive is always free of charge, <strong>no jumping through hoops to cancel</strong>. To start your trial subscription, drop us an email at <a href="mailto:TrendCompass@ISystem-TF.com">TrendCompass@ISystem-TF.com</a></p><blockquote><h4>NEW: Check out <a href="https://trendcompass.substack.com/">TrendCompass on Substack</a>!</h4></blockquote><p>For<strong> <a href="https://isystem-tf.com/solutions/u-s-investors/">US investors</a></strong>, we propose a trend-driven inflation/recession resilient portfolio covering a basket of 30+ financial and commodities markets. Further information is at <a href="https://isystem-tf.com/solutions/u-s-investors/">link</a>.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac091333-6cda-4dbc-8a55-6726bca3079a_1456x912.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac091333-6cda-4dbc-8a55-6726bca3079a_1456x912.png" width="1456" height="912" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/ac091333-6cda-4dbc-8a55-6726bca3079a_1456x912.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":912,"width":1456,"resizeWidth":null,"bytes":686512,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><p></p>

attributes:
{"enclosures":[{"url":"https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13c05542-b49d-41f3-9188-109c44a3a084_2575x1189.png","type":"image/jpeg","length":0}]}


guid: https://htmhell.dev/adventcalendar/2024/17/
title: How I gained a new perspective on ARIA
author: ;Manuel Matuzovic
link: https://htmhell.dev/adventcalendar/2024/17/
hash: ���0�cogf?LUa
attributes: {"enclosures":[]}
content:
by Marco Bretschneider<br><p>Can you remember the day you first learnt about ARIA? Maybe the first fact you learnt about <a href="https://www.w3.org/TR/using-aria/#NOTES">ARIA was the first rule</a> “Don't use ARIA, use native HTML instead“ - and so did I.</p>

<p>As someone who has been able to speak native HTML for many years, I always thought that ARIA is not relevant for a developer like me.<br>
How incredibly wrong I was...</p>
<h2 data-sanitized-id='my-"wait-a-minute"-moment'>My “Wait a minute” moment</h2>
<p>With the entry into force of the <a href="https://employment-social-affairs.ec.europa.eu/policies-and-activities/social-protection-social-inclusion/persons-disabilities/union-equality-strategy-rights-persons-disabilities-2021-2030/european-accessibility-act_en">European Accessibility Act</a>, accessibility has also become more important in our products, which are mainly used internally by banks.<br>
For this reason, we have subjected our products to an accessibility audit.<br>
One thing that really surprised me was that the auditor found fault with the following code.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>nav</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>ul</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>li</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">      <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>a</span> <span data-sanitized-class="token attr-name">href</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>#<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>First navigation link<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>a</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>li</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>li</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">      <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>a</span> <span data-sanitized-class="token attr-name">href</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>#<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>active<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Second navigation link<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>a</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>li</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token comment">&lt;!-- more navigation links --&gt;</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>ul</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>nav</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<pre data-sanitized-class="language-css"><code data-sanitized-class="language-css"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token selector">.active</span> <span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token comment">/* Highlight the selected navigation entry */</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span></span></code></pre>
<p>When it comes to supporting people with visual impairments, it is our job as developers to convey as much information as possible that we also display to sighted people.<br>
People with visual impairments usually use a screen reader to consume the information on a page or application. A screen reader in turn obtains its information from the accessibility tree, which - together with the DOM tree - is generated in the browser.</p>
<figure data-sanitized-class="u-mb">
  <img src="https://htmhell.dev/adventcalendar/2024/17/a11y-tree-1-1.png" alt="The second linked selected in Firefox Dev Tools showing its accessible properties" loading="lazy" width="693" height="793">
  <figcaption>The code example above represented in the accessibility tree
  </figcaption>
</figure>
<p>The information that the second entry in the navigation references the currently active page is not transported - unlike for sighted people.</p>
<h2 data-sanitized-id="a-better-approach">A better approach</h2>
<p>By using ARIA, we can influence how the browser builds the accessibility tree. Specifically, ARIA provides the <code>aria-current</code> attribute for highlighting the currently active page.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>nav</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>ul</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>li</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">      <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>a</span> <span data-sanitized-class="token attr-name">href</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>#<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>First navigation link<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>a</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>li</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>li</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">      <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>a</span> <span data-sanitized-class="token attr-name">href</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>#<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">aria-current</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>page<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Second navigation link<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>a</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>li</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token comment">&lt;!-- more navigation links --&gt;</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>ul</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>nav</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<pre data-sanitized-class="language-css"><code data-sanitized-class="language-css"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token selector">[aria-current="page"]</span> <span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token comment">/* Highlight the selected navigation entry */</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span></span></code></pre>
<p>Now, the information that the second navigation entry references the currently displayed page is also transferred to the accessibility tree and can be used by screen readers.</p>
<p><img src="https://htmhell.dev/adventcalendar/2024/17/a11y-tree-2-1.png" alt="Firefox Dev Tools: Besides focusable, linked and more, the link now has an additional 'current' state in the accessibility tree"></p>
<p>In addition, the <code>aria-current</code> attribute can also be used as a CSS hook for styling for sighted users. The <code>active</code> class initially used for this has therefore become obsolete.</p>
<h2 data-sanitized-id="other-examples">Other examples</h2>
<p>There are other examples where we can enrich the accessibility tree using ARIA attributes, such as error messages for form fields.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>label</span> <span data-sanitized-class="token attr-name">for</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>email<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>E-Mail<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>e-mail<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>email<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>error<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span>Enter a valid e-mail address<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>The class <code>error</code> is used here to indicate fields that have been filled in incorrectly. For sighted users, the field is then styled accordingly using the class. Unfortunately, this information is not available in the accessibility tree.<br>
There is also an error message, but it is only visually linked to the input field and not programmatically (e.g., the label is linked to the input field).<br>
Unfortunately, we cannot enhance the accessibility tree with pure HTML. With ARIA, however, we can.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>label</span> <span data-sanitized-class="token attr-name">for</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>email<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>E-Mail<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>e-mail<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>email<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">aria-invalid</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>true<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">aria-describedby</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>e-mail-error<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>e-mail-error<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Enter a valid e-mail address<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p><img src="https://htmhell.dev/adventcalendar/2024/17/a11y-tree-3.png" alt="Firefox Dev Tools: Besides focusable, editable and more, the input field now has an additional 'invalid' state in the accessibility tree"></p>
<p>In the accessibility tree, we can see that the input field is marked as invalid and a relation to the error message is created.<br>
Once again, we can use the <code>aria-invalid</code> attribute as a CSS hook for styling. An <code>error</code> class is not required anymore.</p>
<h2 data-sanitized-id="conclusion">Conclusion</h2>
<p>By using ARIA, we can influence the accessibility tree and enrich it with information that the browser cannot derive from native HTML. Screen reader vendors can use the information to create a better user experience for people who rely on assistive technologies.</p>
<p>The accessibility tree is built up of nodes that are typified by ARIA roles. The <a href="https://www.w3.org/TR/wai-aria-1.2/#roles_categorization">WAI ARIA specification</a> recognises around 90 different ARIA roles. They were defined because there is a sensible use for each of them.  By using native HTML, however, only half of these roles are met.  We can use the <code>role</code> attribute to influence the types of the nodes in the accessibility tree and achieve the entire spectrum - if it is appropriate for the use case.  Ignoring ARIA and ‘only’ using native HTML means that we are only using just under half of the richness that the accessibility tree provides.</p>
<p>I still don't know exactly when I heard about ARIA for the first time. But I can name the exact day when I had my wait a minute moment. Today, I know that the <a href="https://www.w3.org/TR/using-aria/#rule1">first rule of ARIA</a> is often abbreviated and a crucial detail of the rule is lost. Certain things cannot be expressed semantically in HTML at all and if ARIA offers a possibility here, we should make use of it.</p>
<p>Perhaps we should see ARIA as a counterpart to CSS. While we use CSS to enrich our HTML document for sighted users (progressive enhancement), we can use ARIA to enrich the accessibility tree for non-sighted users.</p>


guid: https://htmhell.dev/adventcalendar/2024/18/
title: Microdata for books
author: ;Manuel Matuzovic
link: https://htmhell.dev/adventcalendar/2024/18/
hash: ���Q����W|A�,�
attributes: {"enclosures":[]}
content:
by Alan Dalton<br><h2 data-sanitized-id="dive-into-marking-up-books">Dive into marking up books</h2>
<p>Books are the best Christmas presents, especially for us web geeks. (I hope you’ll find a <a href="https://accessibility-cookbook.com/">Web Accessibility Cookbook</a> in your Christmas stocking, gentle reader.) Unfortunately, <a href="https://abookapart.com/pages/about/">A Book Apart closed</a> this year. Fortunately, the authors reacquired the rights to their books.</p>
<p>To track the authors’ preferred ways of making their books available, I created an <a href="https://alandalton.github.io/Authors-Apart/">“Authors Apart” webpage</a>. For the HTML, I recalled the <a href="https://diveinto.html5doctor.com/extensibility.html">“‘Distributed,’ ‘Extensibility,’ &amp; Other Fancy Words” chapter</a> of Mark Pilgrim’s seminal <a href="https://diveinto.html5doctor.com/">Dive Into HTML5</a>, which explains <a href="https://html.spec.whatwg.org/multipage/microdata.html#microdata">HTML’s microdata features</a>. Mark wrote that article 13 years ago with a focus on Google Rich Snippets, and so I also referred to his <a href="https://web.archive.org/web/20110607011745/http://diveintomark.org/archives/2011/06/02/schema-org">unofficial guide to migrating Google Rich Snippets to schema.org</a> and the more recent <a href="https://schema.org/Book">“Book” schema from Schema.org</a>. Armed with that knowledge, here’s how I structured the HTML for each book to convey the name, URL, author’s name, author’s URL, original publishing date, date when the book was updated (if any), and whether it’s available for free:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>li</span> <span data-sanitized-class="token attr-name">itemscope</span> <span data-sanitized-class="token attr-name">itemtype</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>https://schema.org/Book<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span> <span data-sanitized-class="token attr-name">itemprop</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>name<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>a</span> <span data-sanitized-class="token attr-name">itemprop</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>url<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">href</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>https://html5forwebdesigners.com/<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>abbr</span> <span data-sanitized-class="token attr-name">title</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>HyperText Markup Language<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>HTML<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>abbr</span><span data-sanitized-class="token punctuation">&gt;</span></span>5 for Web Designers<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>a</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span> <span data-sanitized-class="token attr-name">itemprop</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>author<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">itemscope</span> <span data-sanitized-class="token attr-name">itemtype</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>https://schema.org/Person<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>span</span> <span data-sanitized-class="token attr-name">itemprop</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>name<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">			<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>a</span> <span data-sanitized-class="token attr-name">itemprop</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>url<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">href</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>https://adactio.com/<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Jeremy Keith<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>a</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>span</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span> <span data-sanitized-class="token attr-name">itemprop</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>author<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">itemscope</span> <span data-sanitized-class="token attr-name">itemtype</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>https://schema.org/Person<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>span</span> <span data-sanitized-class="token attr-name">itemprop</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>name<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">			<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>a</span> <span data-sanitized-class="token attr-name">itemprop</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>url<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">href</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>https://x.com/rachelandrew/<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Rachel Andrew<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>a</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>span</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>time</span> <span data-sanitized-class="token attr-name">itemprop</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>datePublished<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>2010<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>time</span><span data-sanitized-class="token punctuation">&gt;</span></span>, </span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>time</span> <span data-sanitized-class="token attr-name">itemprop</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>dateModified<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>2016<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>time</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span> <span data-sanitized-class="token attr-name">itemprop</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>isAccessibleForFree<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">content</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>true<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>🆓<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>li</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<h2 data-sanitized-id="why-i-like-this-html">Why I like this HTML</h2>
<p>I like this HTML because it conveys so much programmatically determinable information — check out the <a href="https://validator.schema.org/#url=https%3A%2F%2Falandalton.github.io%2FAuthors-Apart%2F">structured data</a>! — using only 13 elements, and without compromising accessibility. In 2022’s <a href="https://www.htmhell.dev/adventcalendar/2022/17/">Modern HTML as a foundation for progressive enhancement</a>, Gaël Poupard asked, “What if we could improve the HTML stack […], making the markup step more resilient?” I consider microdata, like <a href="https://www.w3.org/WAI/standards-guidelines/aria/">WAI-Aria</a>, a valuable enhancement to HTML.</p>
<p>Mark’s article asked the reader to pay attention to each word in this sentence: “Microdata annotates the DOM with scoped name/value pairs from custom vocabularies.” The annotation is the enhancement: microdata won’t interfere with your usual best practices for HTML, and — as Doug Abrams explained in <a href="https://www.tpgi.com/mind-the-remediation-gap/">Mind The (Remediation) Gap</a> — “The vast majority of accessibility lives in the markup.” Getting the name/value pairs right can involve some trial and error, but Mark’s book includes a helpful table that shows <a href="https://diveinto.html5doctor.com/extensibility.html#property-values">where microdata property values come from</a>. You can probably spot those pairs in the HTML above. For example, <code>itemprop="url"</code> and <code>href="https://html5forwebdesigners.com/"</code> specify the URL for the HTML5 for Web Designers book, inside the <code>a</code> element. Notice how nicely this microdata plays with the existing HTML: I was also able to include an <code>abbr</code> element to explain the HTML abbreviation. For whatever content your webpage includes, you can probably find a useful schema in the surprisingly comprehensive <a href="https://schema.org/docs/full.html">full schema hierarchy</a>. <a href="http://schema.org/">Schema.org</a>’s <a href="https://schema.org/docs/gs.html">Getting started with schema.org using Microdata</a> is a useful, concise guide, and that site’s <a href="https://validator.schema.org/">validator</a> will instantly show you the structured data that you’ve added to your webpage with microdata.</p>
<h2 data-sanitized-id="a-brief-note-on-laziness">A brief note on laziness</h2>
<p>Christmas is a time for relaxing. <a href="https://www.oreilly.com/library/view/programming-perl-4th/9781449321451/">Programming Perl</a> names laziness, impatience, and hubris as the three great virtues of a programmer, and this code offers us a good opportunity to practice those. Using microdata schemas from <a href="http://schema.org/">Schema.org</a> means that you probably won’t need to spend time thinking up class names or IDs to use in your CSS; instead, you can just write <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors">attribute selectors</a> based on the microdata that you’ve added, like so:</p>
<pre data-sanitized-class="language-css"><code data-sanitized-class="language-css"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token selector">[itemtype="https://schema.org/Book"] &gt; [itemprop="name"]</span> <span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token property">font-weight</span> <span data-sanitized-class="token punctuation">:</span> bold<span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token property">font-size</span> <span data-sanitized-class="token punctuation">:</span> large<span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token property">margin-bottom</span> <span data-sanitized-class="token punctuation">:</span> 1em<span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span></span></code></pre>
<h2 data-sanitized-id="how-microdata-could-help-your-users">How microdata could help your users</h2>
<p>I got ahead of myself there; the <a href="https://www.w3.org/TR/html-design-principles/#:~:text=consider%20users%20over%20authors">HTML design principles</a> say to “consider users over authors”. So, here are some ways in which microdata can benefit your users:</p>
<h3 data-sanitized-id="microdata-could-help-users-when-they-search-the-web">Microdata could help users when they search the web</h3>
<p>Mark Pilgrim’s <a href="https://diveinto.html5doctor.com/extensibility.html">“‘Distributed,’ ‘Extensibility,’ &amp; Other Fancy Words” chapter</a> concluded with a hypothetical search result in which the search engine shows not only an excerpt of the text from the webpage, but also some of the microdata that he added. That does seem useful: it lends some credibility to the search result, and so should allow users to more easily find what they’re looking for. This has persisted: Google Search Central’s <a href="https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data#:~:text=Adding%20structured%20data%20can%20enable%20search%20results%20that%20are%20more%20engaging%20to%20users%20and%20might%20%20encourage%20them%20to%20interact%20more%20with%20your%20website">Introduction to structured data markup in Google Search</a> says that “Adding structured data can enable search results that are more engaging to users and might encourage them to interact more with your website […]”. To prove the point, Google Search Central’s <a href="https://developers.google.com/search/case-studies?hl=en">case studies</a> show how well-known organisations have used these techniques to improve search experiences for their users. However, the search engines may or may not show your webpage’s microdata. It doesn’t seem to have happened for my “Authors Apart” webpage yet, and I’m not suprised; Mark qualified his hypothetical example by saying, “And here (modulo the whims of Google, the phase of the moon, and so on and so forth) is what my review might look like in a search result listing”.</p>
<h3 data-sanitized-id="microdata-could-help-users-when-they-use-artificial-intelligence-tools">Microdata could help users when they use Artificial Intelligence tools</h3>
<p>Similarly to Mark’s point about the whims of Google, Jono Alderson’s recent <a href="https://www.jonoalderson.com/conjecture/what-if-schema-org-is-just-labels/">What if Schema.org is just… Labels?</a> describes Google’s use of microdata as feeling “limited, selective, inconsistent, and often frustratingly opaque”. Jono goes on to highlight how the relationships that we define through microdata can help users who use AI tools. Of course, you might not consider this to be a net benefit: Molly White’s <a href="https://www.citationneeded.news/ai-isnt-useless/">AI isn't useless. But is it worth it?</a> weighs up the costs and benefits of these new tools.</p>
<h3 data-sanitized-id="microdata-could-help-your-users-by-making-html-more-prevalent">Microdata could help your users by making HTML more prevalent</h3>
<p>This is my favourite benefit of using microdata, even if it’s indirect. See, personally, I agree with the National Center on Disability and Access to Education’s <a href="https://www.ncdae.org/resources/factsheets/principles.php#:~:text=HTML%20is%20still%20the%20most%20accessible%20format%20for%20almost%20every%20type%20of%20content.">Principles of Accessible Design</a> when they said in 2007, “HTML is still the most accessible format for almost every type of content”. So, it seems to me that the more we use HTML, the more accessible our content is for our users. My favourite recent example of this is Knut Hühne’s <a href="https://blog.k-nut.eu/leaflet-microdata-html-webcomponent">microdata-enhanced HTML Webcomponent for Leaflet</a>. (<a href="https://leafletjs.com/">Leaflet</a> is “an open-source JavaScript library for mobile-friendly interactive maps”.) In a nice piece of progressive enhancement, Knut uses microdata to mark up geographical data from an API, so that basic address information is available to everyone on every browser, and graphical maps are available too.</p>
<p>To quote Mark Pilgrim one more time, “Angle brackets don’t impress me much, but I have to admit, that’s pretty cool.’</p>


guid: 6165d5e4ab2c8b5f79b5d82e:6165f805cc4a70035862ada3:67631e47bb9d5725ff2152bb
title: Dred Scott, politics, and the “living” constitution
author: ;Lisa P
link: https://www.rightsprobe.org/read/dred-scott-politics-and-the-living-constitution
hash: @ �� *�_K�N�͡�,
content:
<p data-sanitized-class="">By Wanjiru Njoya | Published by Lew Rockwell.com</p><p data-sanitized-class="">In a 2022 article <a href="https://penncapital-star.com/commentary/we-dont-want-to-say-it-but-165-years-later-dred-scott-is-alive-and-well-michael-coard/" target="_blank"><span>titled</span></a> “Will the U.S. Supreme Court ever get around to overruling the shame of Dred Scott?” the surprising proposition is advanced that the 1857 Dred Scott case is “still precedent” in the United States, and that “racist lawyers and racist judges can (blatantly or discreetly) rely on it in their arguments and rulings.” Like President Biden’s <a href="https://www.congress.gov/bill/117th-congress/house-bill/55#:~:text=Specifically%2C%20the%20bill%20imposes%20criminal,an%20attempt%20to%20commit%20aggravated" target="_blank"><span>Antilynching Act of 2021</span></a>, we are asked to believe that the injustices of past centuries are still in operation and new laws are needed to eradicate them.</p><p data-sanitized-class=""><span data-sanitized-class="sqsrte-text-color--accent">Summary</span></p><p data-sanitized-class="">The Walter E. Williams Research Fellow for the Mises Institute, Wanjiru Njoya looks at the ongoing debate between originalists, who interpret the Constitution based on its original meaning, and those who view it as a "living" document that evolves with societal changes. </p><p data-sanitized-class="">Her argument against judicial activism and the "living tree" doctrine is exemplified by Canadian law professor <span data-sanitized-class="sqsrte-text-color--accent">Bruce Pardy</span>'s <a href="https://nationalpost.com/opinion/bruce-pardy-rosalie-abella-was-shameless-in-making-up-the-law-and-mainstreaming-judicial-activism" target="_blank">critique</a> of Supreme Court justices like Rosalie Abella. Professor Pardy points out that the "living tree" justification for judicial activism, where judges resolve contested moral and social values, is comparatively recent. For centuries, the role of judges was to interpret the law as it is, not as they think it ought to be.</p><p data-sanitized-class="">Pardy observes:</p><blockquote><p data-sanitized-class="">Justice Brian Dickson, later the Supreme Court’s chief justice, in a 1978 decision, rejected the notion that the court should weigh political and socio-economic issues, which would necessarily reflect judges’ personal beliefs. He cited U.S. Supreme Court Justice Benjamin Cardozo, who wrote in 1921 that a judge “is not to innovate at pleasure. He is not a knight errant, roaming at will in pursuit of his own ideal of beauty or of goodness.”</p></blockquote><p data-sanitized-class="">This was one of the key issues in the Dred Scott case. The legal issue was not whether slavery is morally abhorrent, but whether it was prohibited by the Constitution. </p><p data-sanitized-class="">Njoya discusses the historical context of the 1857 Dred Scott case, which culminated in a Supreme Court ruling that reflected the original meaning of the Constitution at the time, which did not consider slaves as citizens. The majority opinion, led by Chief Justice Roger B. Taney, argued that the Constitution's original intent must be upheld, despite the moral abhorrence of slavery. </p><p data-sanitized-class="">Njoya critiques the notion that courts should disregard the Constitution when addressing past injustices, as seen in the push for new laws such as President Biden’s Antilynching Act of 2021. She emphasizes the importance of constitutional interpretation and the rule of law, rather than allowing judges to impose their personal beliefs. A principled approach to constitutional interpretation, she argues, is needed to distinguish between moral opposition to past injustices and the legal framework that governs such issues:</p><blockquote><p data-sanitized-class="">Abolitionists like Lysander Spooner had a more principled position than contemporary hypocritical neo-Puritans. While Spooner regarded slavery as morally wrong, it did not follow that he agreed with the subsequent war of Northern aggression. Spooner regarded it as morally wrong to wage wars of aggression, regardless of the alleged good motives of the aggressor. Other libertarians, including Murray Rothbard, take the same view as Spooner. Moral wrongs are not “total” in the sense that once a wrong has been established it justifies the perpetration of further wrongs, otherwise injustice would merely precipitate further and more egregious injustices. This explains why Spooner did not simply argue that slavery was morally wrong, but rather sought to show that it was also unconstitutional. He made the effort, which is the only approach compatible with the rule of law, to distinguish his moral opposition to slavery and his opposition to the majority view of its constitutionality, from the question of the justice of Lincoln’s war.</p></blockquote><p data-sanitized-class=""><a href="https://www.lewrockwell.com/2024/12/no_author/dred-scott-politics-and-the-living-constitution/" target="_blank">For the original, full-text version of this opinion piece, see the publisher’s website here</a>.</p><p data-sanitized-class=""><strong>Further Reading</strong></p><p data-sanitized-class=""><a href="https://nationalpost.com/opinion/bruce-pardy-rosalie-abella-was-shameless-in-making-up-the-law-and-mainstreaming-judicial-activism" target="_blank">Rosalie Abella was shameless in making up the law and mainstreaming judicial activism</a></p>





















  
  



<hr>


  <p data-sanitized-class="">Follow our journey.</p><p data-sanitized-class="">Subscribe to our newsletter: <a href="mailto:rightsprobe@protonmail.com?" target="_blank">rightsprobe@protonmail.com</a></p>

attributes:
{"enclosures":[{"url":"https://images.squarespace-cdn.com/content/v1/6165d5e4ab2c8b5f79b5d82e/1734550472977-HQ7AX1K4FKJKNLVI33SQ/33345428818_d343a001d0_b.jpg?format=1500w","title":"Dred Scott, politics, and the “living” constitution","type":"image/jpeg","medium":"image","height":1024,"width":662}]}


guid: https://htmhell.dev/adventcalendar/2024/19/
title: Getting Oriented with HTML Video
author: ;Manuel Matuzovic
link: https://htmhell.dev/adventcalendar/2024/19/
hash: �<���9�9��[���
attributes: {"enclosures":[]}
content:
by Scott Jehl<br><p>A couple years back, I was in a window seat on a flight from Amsterdam to New York. The weather was gray and drizzly as the plane took off, but as it punched through the clouds a very different scene revealed itself. Out my window, it looked like a <a href="https://en.wikipedia.org/wiki/Maxfield_Parrish">Maxfield Parrish</a> painting brought to life. And the plane's speed made it appear to scroll by with this uncanny effect, like a parallax effect that used the wrong easing function. Mesmerizing! I pulled out my phone and recorded a couple of videos.</p>
<p>One in landscape:</p>
<video controls="controls" playsinline="" muted="" loop="" data-sanitized-class="u-mb" preload="none">
    <source src="https://htmhell.dev/adventcalendar/2024/19/sunset-landscape-1080.mp4">
</video>
<p>And one in portrait:</p>
<video controls="controls" playsinline="" muted="" loop="" preload="none">
    <source src="https://htmhell.dev/adventcalendar/2024/19/sunset-portrait-1080.mp4">
</video>
<p>I didn't realize at the time that those video orientations would come in handy for a little post on this website.</p>
<p>Let's jump ahead a year to mid 2023. For years, many of us had been advocating for a simple, HTML-based way to serve video files in different sizes and formats using media queries—essentially how the <code>picture</code> element handles images. I won't rehash the entire history here, but that concept wasn't new or mine to claim. In fact, we once had exactly such a feature. It was a web standard, supported by all browsers, and it even inspired the design of the <code>picture</code> element—not the other way around. However, just as <code>picture</code> was on track to land, the <code>video</code> features that inspired it were removed from the HTML spec and supporting browsers (except WebKit). Many of us believed this was a mistake, as it left developers without an HTML-only solution to serve responsive, art-directed video content. Finally, sometime mid 2023, representatives from Chrome and Firefox agreed and expressed interest in reintroducing the feature, and "responsive video" was back on the standards track.</p>
<p>Jump forward to today: responsive video is once again part of the HTML standard and built back into browsers as well (<a href="https://scottjehl.com/posts/responsive-video/">I was able to contribute the commits to Firefox</a>)! Now that it's back, we can use <code>media</code> attributes on HTML <code>source</code> elements within HTML <code>video</code>, which allow us to describe the conditions in which a particular version or format of a static video file should be downloaded and displayed. It's not meant to solve every video use case, but it's nice for many of them; particularly if you just want to serve an appropriate video file and can't be bothered (or aren't able) to set up HLS streaming.</p>
<p>In today's post, I want to show you how to use this feature to deliver my airplane video so that it's optimized for any viewport it happens to land on.</p>
<p>Let's start with the HTML: a <code>video</code> element with some <code>source</code>s. Below, I'm offering one video orientation or the other using media queries (check those <code>media</code> attributes on the <code>source</code> elements)!</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>video</span> <span data-sanitized-class="token attr-name">autoplay</span> <span data-sanitized-class="token attr-name">controls</span> <span data-sanitized-class="token attr-name">playsinline</span> <span data-sanitized-class="token attr-name">muted</span> <span data-sanitized-class="token attr-name">loop</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>source</span> <span data-sanitized-class="token attr-name">media</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>(orientation: landscape)<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">src</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>sunset-landscape-1080.mp4<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>source</span> <span data-sanitized-class="token attr-name">src</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>sunset-portrait-1080.mp4<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>video</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>Nice. We can do better, though. A 1080px-wide video is a large file to send smaller screens and mp4 isn't the smallest format we can offer for a high-quality video of any resolution. Let's use more media queries to offer some smaller video sizes for each orientation and a webm format for each source too, which I put first so that supporting browsers will pick it over the heavier mp4 alternative.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>video</span> <span data-sanitized-class="token attr-name">autoplay</span> <span data-sanitized-class="token attr-name">controls</span> <span data-sanitized-class="token attr-name">playsinline</span> <span data-sanitized-class="token attr-name">muted</span> <span data-sanitized-class="token attr-name">loop</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>source</span> <span data-sanitized-class="token attr-name">media</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>(min-width:721px) and (orientation: landscape)<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>video/webm<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">src</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>sunset-landscape-1080.webm<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>source</span> <span data-sanitized-class="token attr-name">media</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>(min-width:721px) and (orientation: landscape)<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">src</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>sunset-landscape-1080.mp4<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>source</span> <span data-sanitized-class="token attr-name">media</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>(min-width:721px) and (orientation: portrait)<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>video/webm<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">src</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>sunset-portrait-1080.webm<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>source</span> <span data-sanitized-class="token attr-name">media</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>(min-width:721px) and (orientation: portrait)<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">src</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>sunset-portrait-1080.mp4<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>source</span> <span data-sanitized-class="token attr-name">media</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>(min-width:481px) and (orientation: landscape)<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>video/webm<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">src</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>sunset-landscape-720.webm<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>source</span> <span data-sanitized-class="token attr-name">media</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>(min-width:481px) and (orientation: landscape)<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">src</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>sunset-landscape-720.mp4<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>source</span> <span data-sanitized-class="token attr-name">media</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>(min-width:481px) and (orientation: portrait)<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>video/webm<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">src</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>sunset-portrait-720.webm<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>source</span> <span data-sanitized-class="token attr-name">media</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>(min-width:481px) and (orientation: portrait)<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">src</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>sunset-portrait-720.mp4<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>source</span> <span data-sanitized-class="token attr-name">media</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>(orientation: landscape)<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>video/webm<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">src</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>sunset-landscape-480.webm<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>source</span> <span data-sanitized-class="token attr-name">media</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>(orientation: landscape)<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">src</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>sunset-landscape-480.mp4<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>source</span> <span data-sanitized-class="token attr-name">media</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>(orientation: portrait)<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>video/webm<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">src</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>sunset-portrait-480.webm<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>source</span> <span data-sanitized-class="token attr-name">media</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>(orientation: portrait)<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">src</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>sunset-portrait-480.mp4<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>video</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>Nice! That's a hefty chunk of HTML to be fair, but it does demonstrate the power we're afforded through these features. The video below uses that exact markup, so depending on the size and shape of your viewport when you load this page, you'll be delivered an appropriate video:</p>
<video controls="controls" playsinline="" muted="" loop="" preload="none">
    <source media="(min-width:721px) and (orientation: landscape)" type="video/webm" src="https://htmhell.dev/adventcalendar/2024/19/sunset-landscape-1080.webm">
    <source media="(min-width:721px) and (orientation: landscape)" src="https://htmhell.dev/adventcalendar/2024/19/sunset-landscape-1080.mp4">
    <source media="(min-width:721px) and (orientation: portrait)" type="video/webm" src="https://htmhell.dev/adventcalendar/2024/19/sunset-portrait-1080.webm">
    <source media="(min-width:721px) and (orientation: portrait)" src="https://htmhell.dev/adventcalendar/2024/19/sunset-portrait-1080.mp4">
    <source media="(min-width:481px) and (orientation: landscape)" type="video/webm" src="https://htmhell.dev/adventcalendar/2024/19/sunset-landscape-720.webm">
    <source media="(min-width:481px) and (orientation: landscape)" src="https://htmhell.dev/adventcalendar/2024/19/sunset-landscape-720.mp4">
    <source media="(min-width:481px) and (orientation: portrait)" type="video/webm" src="https://htmhell.dev/adventcalendar/2024/19/sunset-portrait-720.webm">
    <source media="(min-width:481px) and (orientation: portrait)" src="https://htmhell.dev/adventcalendar/2024/19/sunset-portrait-720.mp4">
    <source media="(orientation: landscape)" type="video/webm" src="https://htmhell.dev/adventcalendar/2024/19/sunset-landscape-480.webm">
    <source media="(orientation: landscape)" src="https://htmhell.dev/adventcalendar/2024/19/sunset-landscape-480.mp4">
    <source media="(orientation: portrait)" type="video/webm" src="https://htmhell.dev/adventcalendar/2024/19/sunset-portrait-480.webm">
    <source media="(orientation: portrait)" src="https://htmhell.dev/adventcalendar/2024/19/sunset-portrait-480.mp4">
</video>
<p>It's worth reiterating a caveat here: responsive video works as you'd expect when you first load the page, but it does not reevaluate sources again after that, so you won't see sources adapt as you resize your browser for example. This is intentional: unfortunately, this first pass of reinstated responsive video support needed to match the behavior it formerly had, which only selected an appropriate video source at page load time. As far as I'm concerned, this is a bug that should be addressed. <a href="https://scottjehl.com/posts/rwd-video/">I've written about it and a few others here</a> if you're interested.</p>
<p>Anyway, for now the native implementation falls a little short, but it handles the hard parts and we can make it a little better if we want to anyway!</p>
<p>Below, I'm wrapping the video in <a href="https://scottjehl.com/posts/even-responsiver-video/">a little HTML Web Component I made called <code>responsive-video</code></a>, which will cause the browser to reevaluate its sources when media conditions change, and also keep the video timecode sync'd properly should a source video change. Markup-wise, it works like this, by wrapping the video and referencing a script:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>responsive-video</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>video</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    ...sources go here</span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>video</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>responsive-video</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>script</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>module<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">src</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>responsivevideo.js<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span><span data-sanitized-class="token script"></span><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>script</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>And here it is in action!</p>
<responsive-video>
    <video controls="controls" playsinline="" muted="" loop="" preload="none">
        <source media="(min-width:721px) and (orientation: landscape)" type="video/webm" src="https://htmhell.dev/adventcalendar/2024/19/sunset-landscape-1080.webm">
        <source media="(min-width:721px) and (orientation: landscape)" src="https://htmhell.dev/adventcalendar/2024/19/sunset-landscape-1080.mp4">
        <source media="(min-width:721px) and (orientation: portrait)" type="video/webm" src="https://htmhell.dev/adventcalendar/2024/19/sunset-portrait-1080.webm">
        <source media="(min-width:721px) and (orientation: portrait)" src="https://htmhell.dev/adventcalendar/2024/19/sunset-portrait-1080.mp4">
        <source media="(min-width:481px) and (orientation: landscape)" type="video/webm" src="https://htmhell.dev/adventcalendar/2024/19/sunset-landscape-720.webm">
        <source media="(min-width:481px) and (orientation: landscape)" src="https://htmhell.dev/adventcalendar/2024/19/sunset-landscape-720.mp4">
        <source media="(min-width:481px) and (orientation: portrait)" type="video/webm" src="https://htmhell.dev/adventcalendar/2024/19/sunset-portrait-720.webm">
        <source media="(min-width:481px) and (orientation: portrait)" src="https://htmhell.dev/adventcalendar/2024/19/sunset-portrait-720.mp4">
        <source media="(orientation: landscape)" type="video/webm" src="https://htmhell.dev/adventcalendar/2024/19/sunset-landscape-480.webm">
        <source media="(orientation: landscape)" src="https://htmhell.dev/adventcalendar/2024/19/sunset-landscape-480.mp4">
        <source media="(orientation: portrait)" type="video/webm" src="https://htmhell.dev/adventcalendar/2024/19/sunset-portrait-480.webm">
        <source media="(orientation: portrait)" src="https://htmhell.dev/adventcalendar/2024/19/sunset-portrait-480.mp4">
    </video>
</responsive-video>

<p>With that little helper component, our video adapts its size and orientation not only at load, but continuously through a session. <em>Somebody tell YouTube Shorts and TikTok!</em></p>
<p>So now you know how to serve a video in portrait or landscape orientation declaratively with HTML. Happy Holidays.</p>


guid: https://htmhell.dev/adventcalendar/2024/20/
title: My favourite colour is Chuck Norris red
author: ;Manuel Matuzovic
link: https://htmhell.dev/adventcalendar/2024/20/
hash: ���n:4����(�� ��
attributes: {"enclosures":[]}
content:
by Declan Chidlow<br><p>Setting the colour of text on a webpage is usually a simple affair involving whipping it out the good ol' CSS <code>color</code> property. But this is HTMHell, dammit. None of that wishy-washy CSS nonsense here. No siree. We use HTML as the good lord intended and shalln't stray into the sins of cascading sheets lest we end up some non-HTML variant of hell where they define page structure with JavaScript vars.</p>
<p>But HTML isn't great for defining styles -- or at least, it isn't anymore. If we wind back the clocks a few years to HTML versions of old, we find the colour attribute. If you've been around for a while, you've no doubt seen it. Something like this:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>font</span> <span data-sanitized-class="token attr-name">color</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>#d72b2b<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>HTMHell rules!<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>font</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>HTMHell rules!</p>
<p>If we render that in a browser, we get some text in the lovely HTMHell red. That's great. That's what we'd expect. Next we'll choose another colour. Something a bit different. Let's try 'chucknorris'.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>font</span> <span data-sanitized-class="token attr-name">color</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>chucknorris<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>But... Chuck Norris isn't a colour.<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>font</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>But... Chuck Norris isn't a colour.</p>
<p>If you go through the effort of loading <em>that</em> up in a browser, you might notice it makes the text red. Why?</p>
<h2 data-sanitized-id="some-funny-character-parsing">Some funny character parsing</h2>
<p>HTML generally doesn't have an error state, at least not one akin to what would happen if writing something like invalid JavaScript. Browsers are very forgiving when parsing HTML (which explains how people have gotten away with the crimes documented throughout this website) and generally do their best to make up for user error. If you leave a dangling <code>&lt;div&gt;</code>, the browser will do its best to close it up and render it out.</p>
<p>This forgiveness is the reason behind the funkiness. Browsers simply try to forge ahead with the invalid value and hope it'll work. In the past web browsers all handled invalid values a bit differently, but now it's all outlined in the <a href="https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#rules-for-parsing-a-legacy-colour-value">"rules for parsing a legacy color value" part of the HTML spec</a>. A surmised version of the parsing outlined there is as follows:</p>
<ol>
<li>
<p>Initial Cleanup:</p>
<ul>
<li>If an octothorpe (#) is located at the start of the value, it's removed.</li>
<li>The colour attribute only accepts hexes, so there isn't a point keeping it.</li>
<li>Example: "#FF0000" becomes "FF0000".</li>
</ul>
</li>
<li>
<p>Replace Invalid Characters:</p>
<ul>
<li>Any non-hexadecimal characters (anything not 0-9 or A-F/a-f) are removed and replaced with '0'.</li>
<li>Example: 'abcxyz123' becomes 'abc000123'.</li>
</ul>
</li>
<li>
<p>Standardise Length:</p>
<ul>
<li>While the string's length is 0 or not divisible by 3, append '0'.</li>
<li>Examples:
<ul>
<li>"F" becomes "F00" (padded to length 3).</li>
<li>"FFFF" becomes "FFFF00" (padded to length 6).</li>
<li>"FFFFFF0" becomes "FFFFFF000" (padded to length 9).</li>
</ul>
</li>
</ul>
</li>
<li>
<p>Split into Red, Green, and Blue:</p>
<ul>
<li>The first third becomes the red value.</li>
<li>The second third becomes the green value.</li>
<li>The last third becomes the blue value.</li>
<li>Example: "FFFFFF000" becomes ["FFF", "FFF", "000"].</li>
</ul>
</li>
<li>
<p>Handle Length:</p>
<ul>
<li>If any component is longer than 8 characters, remove the characters from the left until it's 8 characters long.
<ul>
<li>Example: "123456789" → "23456789"</li>
</ul>
</li>
<li>While the length is greater than 2, and all components start with '0', remove the leading '0' from each component.
<ul>
<li>Example: ["000F", "000F", "000F"] becomes ["00F", "00F", "00F"] which then becomes ["0F", "0F", "0F"].</li>
</ul>
</li>
<li>If length is still greater then 2 keep only the first 2 characters of each component.
<ul>
<li>Example: ["ABC", "DEF", "123"] becomes ["AB", "DE", "12"].</li>
</ul>
</li>
</ul>
</li>
<li>
<p>Putting It Together:</p>
<ul>
<li>Get the final red, blue, and green components, then put them together in that order to create the colour.</li>
<li>Example: ["AB", "DE", "12"] becomes ABDE12.</li>
</ul>
</li>
</ol>
<p>I've written a small tool over on CodePen that will take any inputted value, break down the processing step by step, and output the colour as it would be handled. Go have a bit of fiddle!</p>
<p data-height="300" data-default-tab="result" data-slug-hash="yLmKBpN" data-pen-title="Legacy HTML Colour Parsing Demo" data-user="OuterVale" data-sanitized-class="codepen">
  <span>See the Pen <a href="https://codepen.io/OuterVale/pen/yLmKBpN">
  Legacy HTML Colour Parsing Demo</a> by Declan Chidlow (<a href="https://codepen.io/OuterVale">@OuterVale</a>)
  on <a href="https://codepen.io/">CodePen</a>.</span>
</p>

<h2 data-sanitized-id="some-fun-examples">Some fun examples</h2>
<p>So, we know this happens and why. The next task is obviously to have some fun with it. Finding words whose computed colours correlate with them is great fun. For example, 'Sonic' gives us a lovely blue like the hedgehog. I've put together a little table of some of these coincidental match ups:</p>
<p data-height="300" data-default-tab="result" data-slug-hash="wvLbjpZ" data-pen-title="Word Correlations With HTML Colour Parsing" data-user="OuterVale" data-sanitized-class="codepen">
  <span>See the Pen <a href="https://codepen.io/OuterVale/pen/wvLbjpZ">
  Word Correlations With HTML Colour Parsing</a> by Declan Chidlow (<a href="https://codepen.io/OuterVale">@OuterVale</a>)
  on <a href="https://codepen.io/">CodePen</a>.</span>
</p>

<h2 data-sanitized-id="interesting-parsing-in-the-modern-era">Interesting parsing in the modern era</h2>
<p>So, that's all well and good, but it's old news. The <code>color</code> and <code>bgcolor</code> attributes that permitted our parsing adventures are relics of HTML 4. They're obsolete (though still in active use on a disturbingly high number of websites). That isn't to say quirks like that have disappeared completely though. CSS has its own set of fascinating peculiarities when it comes to handling invalid colour values. Most modern browsers will clamp values rather than reject them outright -– throw rgb(300, -50, 1000) at a browser and it won't fail; it'll helpfully transform it into rgb(255, 0, 255).</p>
<p>The web's foundational principle of forgiveness -– the inherent flexibility that allows "chucknorris" to be parsed as red, even though the reason it does so is old, silly, and unsupported –- hasn't gone anywhere. Modern browsers still bend over backward to make our code work, even when we throw nonsense at them. It doesn't take long to see this forgiveness in action within the cursed examples held within the pages of HTMHell. Each horrifying snippet, each questionable hack, each "it works but why" moment exists because browsers simply refuse to give up on rendering our 'mistakes'.</p>
<p>The web is built on this foundation of resilience, both in technology and <a href="https://www.w3.org/blog/2022/a-letter-from-our-ceo-the-web-as-the-ultimate-tool-of-resilience-for-the-world">ethos</a>. It's what allows a website from 1996 to still render in a modern browser. It's what lets a page load even when half the CSS is invalid. It's what makes it magic.</p>
<p>I've heard people quip that browsers should be less forgiving and enforce perfection. That allowing jank makes the web somehow 'bad'. I think a perfect web would be a boring web. I certainly wouldn't be here writing were it 'perfect'. It's about making the web work, no matter what we throw at it, and I wouldn't have it any other way.</p>
<p>After all, in a perfect web, "chucknorris" would just be another error message -– and where's the fun in that?</p>
<h2 data-sanitized-id="resources">Resources</h2>
<ul>
<li><a href="http://scrappy-do.blogspot.com/2004/08/little-rant-about-microsoft-internet.html">Sam's Place - A little rant about Microsoft Internet Explorer's color parsing</a></li>
<li><a href="https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#rules-for-parsing-a-legacy-colour-value">HTML Standard</a></li>
<li><a href="https://stackoverflow.com/q/8318911">Why does HTML think "chucknorris" is a color?</a></li>
</ul>


title: A Republic If You Can Keep It Or Phoenix It w/Cynthia and Courtenay Turner
author: ;Rising Tide Foundation
hash: �s=ki�v����r��K
guid:
https://odysee.com/a-republic-if-you-can-keep-it-or-phoenix:9386073cd3496139d996810228129c723f7386ba

content:
<p><img src="https://thumbnails.lbry.com/eYLdrc1ldUc" width="480" alt="thumbnail" title="A Republic If You Can Keep It   Or Phoenix It  w/Cynthia and Courtenay Turner"></p>Cynthia Chung joins Courtenay Turner to discuss her new film Like a Phoenix: The Death and Rebirth of America <br><br>Watch the full film<br>https://www.youtube.com/watch?v=U3EamfkiBTc<br><br>Support the Rising Tide Foundation in the following ways:<br><br>1) Make a donation <br>https://risingtidefoundation.net/support-the-work/<br>2) Subscribe to Matt and Cynthia's Substack<br>matthewehret.substack.com<br>cynthiachung.substack.com<br>3) Buy some books!<br>https://canadianpatriot.org/untold-history-of-canada-books/<br><br>and follow us on www.risingtidefoundation.net and t.me/risingtidefoundation<br>...<br>https://www.youtube.com/watch?v=eYLdrc1ldUc

link:
https://odysee.com/a-republic-if-you-can-keep-it-or-phoenix:9386073cd3496139d996810228129c723f7386ba

attributes:
{"enclosures":[{"url":"https://player.odycdn.com/api/v3/streams/free/a-republic-if-you-can-keep-it-or-phoenix/9386073cd3496139d996810228129c723f7386ba/a34682.mp4","type":"video/mp4","length":237540076}]}


guid: https://htmhell.dev/adventcalendar/2024/21/
title: Grouping form fields
author: ;Manuel Matuzovic
link: https://htmhell.dev/adventcalendar/2024/21/
hash: c ����E��"��
attributes: {"enclosures":[]}
content:
by Matthias Kittsteiner<br><p>When I first stumbled upon <code>fieldset</code> and <code>legend</code>, I didn’t know much about HTML and especially not about accessibility. Everything I noticed was the special way a <code>legend</code> is displayed inside a <code>fieldset</code> – or rather: alongside the border of a <code>fieldset</code>.</p>
<p>Fast forward to (kind of) today: while working on a contact form, I first could get my hands on this element and learned more about it.</p>
<h2 data-sanitized-id="what-is-a-fieldset?">What is a <code>fieldset</code>?</h2>
<p>Every so often I’m surprised how well chosen names in HTML are. <code>fieldset</code> is no exception here. It’s basically a list of form fields (inputs, selects, textareas). It groups all fields inside of it, and makes it a set of fields. And the <code>legend</code> is used as caption of the <code>fieldset</code> (and ultimately it becomes a caption for all of the grouped form fields).</p>
<p>A simple example of a <code>fieldset</code> looks like this:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>fieldset</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>legend</span><span data-sanitized-class="token punctuation">&gt;</span></span>Date<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>legend</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>label</span> <span data-sanitized-class="token attr-name">for</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>date-month<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Month<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">name</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>date[month]<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>number<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>date-month<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>label</span> <span data-sanitized-class="token attr-name">for</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>date-day<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Day<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">name</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>date[day]<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>number<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>date-day<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>label</span> <span data-sanitized-class="token attr-name">for</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>date-year<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Year<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">name</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>date[year]<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>number<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>date-year<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>fieldset</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>Which results in this:</p>
<p><img src="https://htmhell.dev/adventcalendar/2024/21/fieldset-example.png" alt="A fieldset with the group name “Date” and three fields for month, day and year"></p>
<p>In the image you see the default design for a <code>fieldset</code>: It has a border, that is partly interrupted by the <code>legend</code>. Something, that is not the easiest to achieve with other elements with CSS only. However, in the wild, you won’t often see it like this.</p>
<h2 data-sanitized-id="why-does-it-matter?">Why does it matter?</h2>
<p>While for users capable of browsing websites visually, a <code>fieldset</code> often stays hidden, since the default styling usually is changed. Only the <code>legend</code> is visible as caption for a group of fields. For screen reader users, it’s a whole different story if they use it to navigate through the content via keyboard. For every field inside the <code>fieldset</code>, the screen reader announces that it is part of a group as well as the caption. It makes sure that the user is always aware of the context of the group and that the current active field is part of a specific group.</p>
<p>VoiceOver for example will announce the <code>fieldset</code> as “Date, group”:</p>
<p><img src="https://htmhell.dev/adventcalendar/2024/21/fieldset-voiceover-group.png" alt="VoiceOver announcing a fieldset as “Date, group”"></p>
<p>When navigating to the first form field “month”, VoiceOver will announce it as “Month, incrementable edit text number field, Date, Date, group”</p>
<p><img src="https://htmhell.dev/adventcalendar/2024/21/fieldset-voiceover-group-input.png" alt="VoiceOver announcing a field “month” inside a fieldset as “Month, incrementable edit text number field, Date, Date, group”"></p>
<p>Additionally, by using the <code>disabled</code> attribute, you can easily disable a whole group of fields within the <code>fieldset</code>. Feels a little bit like magic. Such disabled fields are neither editable (they ignore user inputs completely), nor will they be submit in a form.</p>
<p>One note though: think about it first before using it. That is also true for a <code>fieldset</code> as a whole.</p>
<p>Ensure fields inside a <code>fieldset</code> are actually connected to each other and even require an identical context. Otherwise, it just makes the announcement more verbose as it should be, since the value of the <code>legend</code> will always be announced to screen reader users (in case of VoiceOver users often even twice). Use it only if the connected fields are not self-explaining if they are used alone, if you can’t properly edit a field the right way without knowing about the context of the group. While connecting multiple fields to enter a date with month/day/year actually will tell you (by a properly set <code>legend</code>) that you’re about to fill out a date, connecting two fields for first and last name won’t have any positive effect, since they can be filled correctly by their own without knowing that the other field exists.</p>
<h2 data-sanitized-id="usage-examples">Usage examples</h2>
<p>Having multiple choice questions, e.g. in a survey, is an ideal example in grouping form fields. You can use the <code>legend</code> as question and radio buttons as the answers:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>fieldset</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>legend</span><span data-sanitized-class="token punctuation">&gt;</span></span>When did you hear about fieldsets the first time?<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>legend</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	</span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>radio<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>before-2000<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">name</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>eyes-opened<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">value</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>before 2000<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token punctuation">/&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>label</span> <span data-sanitized-class="token attr-name">for</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>before-2000<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Before 2000<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>br</span> <span data-sanitized-class="token punctuation">/&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	</span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>radio<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>between-2000-2009<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">name</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>eyes-opened<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">value</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>2000 – 2009<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token punctuation">/&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>label</span> <span data-sanitized-class="token attr-name">for</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>between-2000-2009<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Between 2000 and 2009<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>br</span> <span data-sanitized-class="token punctuation">/&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	</span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>radio<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>between-2010-2019<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">name</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>eyes-opened<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">value</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>2010 – 2019<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token punctuation">/&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>label</span> <span data-sanitized-class="token attr-name">for</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>between-2010-2019<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Between 2010 and 2019<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>br</span> <span data-sanitized-class="token punctuation">/&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	</span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>radio<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>today<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">name</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>eyes-opened<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">value</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>2020 – today<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token punctuation">/&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>label</span> <span data-sanitized-class="token attr-name">for</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>today<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Between 2020 and today<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>br</span> <span data-sanitized-class="token punctuation">/&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>fieldset</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>It could also be used to connect fields for a day, a month and a year for individual input fields to select a specific date (as seen in the first example), as well as hours and minutes to select a time (if native date and time pickers aren't an option). Or you could have different fields for a credit card number by splitting them into four digits each. You see, there are many possibilities to use <code>fieldset</code> elements, just don’t overuse them – because with many possibilities comes great responsibility – or so.</p>
<p>Make also sure to always test your <code>fieldset</code> elements with a screen reader to see whether adding a context in such a way is useful. This will make it easier to distinguish whether you should use a <code>fieldset</code> or better use non-connected single form fields.</p>


guid: https://htmhell.dev/adventcalendar/2024/22/
title: PSA: Stop using the title attribute as tooltip!
author: ;Manuel Matuzovic
link: https://htmhell.dev/adventcalendar/2024/22/
hash: �0�im��݂��F�
attributes: {"enclosures":[]}
content:
by Daniela Kubesch<br><p>It's almost 2025, so it's time to stop using the <code>title</code> attribute everywhere. Images, text, buttons, ... you name it, devs really like to put it on any element in sight. Most of the time, people actually want to create a tooltip. You know, that little bubble of information designed to clarify the purpose of otherwise unclear elements, that pops up attached to an element when its receives focus or a user hovers their mouse over it.</p>
<p>The identifying thing about tooltips is that they contain no interactive elements (aka. only plain text), and are always attached to existing interactive elements.<br>
Whenever you want to add interactive elements inside your information bubble, it's not called <em>tooltip</em>, but <em>toggletip</em>. Toggletips can contain semantic markup, rich content and interactive elements, and usually only appear when an element is clicked. The great thing about toggletips is that they're accessible on touchscreens and easier to find and recognise for users with low vision.</p>
<p>So depending on your use case, you need to implement a tooltip or a toggletip.</p>
<p>But let's circle back to the <code>title</code> attribute. Often, people use it to create a tooltip. However, this is not the recommended way to go.</p>
<h2 data-sanitized-id="but-why-i-love-my-title!?">But why, I love my <code>title</code>!?</h2>
<p>It's simple. The <code>title</code> attribute is inaccessible. Users of mobile phones and tablets, users of assistive technologies, and keyboard only users cannot interact with it.<br>
If you want a tooltip, a much better, and accessible, option is using the <code>popover</code> attribute.</p>
<p><strong>Note:</strong> The only place where you should (&amp; must) use the <code>title</code> attribute is on an <code>iframe</code>! See <a href="https://html5accessibility.com/stuff/2021/08/26/named-and-framed/">Steve Faulkner's post</a> for more information.</p>
<h2 data-sanitized-id="how-to-use-popover">How to use <code>popover</code></h2>
<p>Firstly, before we get started, it is always better to display clear, permanently visible information. So, if space permits, do not use tooltips. Instead, provide clear labels and sufficient text. This is particularly important for forms!</p>
<p>However, if you wanna go down that path, the <code>popover</code> attribute provides a starting point for building popover-like interactions on the web. Its purpose is simply to add 'popover/tooltip behaviour'. So we'll use it to create our custom plain-text tooltip.</p>
<p>To start, we just need an interactive element (like a button) which is used to trigger the tooltip, even when navigating with a keyboard only, and a <code>&lt;div&gt;</code> containing the tooltip content.</p>
<p>The <code>&lt;button&gt;</code> is linked to the tooltip with <code>aria-describedby</code>.<br>
The <code>&lt;div&gt;</code> receives the <code>popover</code> attribute and an <code>id</code>.<br>
As the <code>popover</code> attribute just adds behaviour, not semantics, we need to <a href="https://hidde.blog/popover-semantics/">add our own role when it makes sense</a>. Therefore we add <code>role='tooltip'</code> to the <code>&lt;div&gt;</code>.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>p</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  There is a</span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>button</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>button<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">aria-describedby</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>tooltip<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>secret<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span> to accessible</span><br><span data-sanitized-class="highlight-line">  HTML!</span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>p</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span> <span data-sanitized-class="token attr-name">popover</span> <span data-sanitized-class="token attr-name">role</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>tooltip<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>tooltip<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span>a div is not a button ✨<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<h3 data-sanitized-id="lets-make-it-interactive">Let's make it interactive</h3>
<p>If we would want to create a <em>toggletip</em>, which opens <code>onClick</code>, we could simply add <code>popovertarget="ID"</code> to the <code>&lt;button&gt;</code>, with the <code>id</code> of the toggletip.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line">There is a </span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>button</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>button<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">aria-describedby</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>toggletip<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">popovertarget</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>toggletip<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  secret</span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">to accessible HTML!</span><br><span data-sanitized-class="highlight-line"></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span> <span data-sanitized-class="token attr-name">popover</span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>toggletip<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span>a div is not a button ✨<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<div data-sanitized-class="demo-toggletip">
<p>There is a <button type="button" aria-describedby="toggletip" popovertarget="toggletip" data-sanitized-class="popoverbutton togglebutton">secret</button> to accessible HTML!</p>
<div popover="" data-sanitized-id="toggletip">
  <div data-sanitized-class="tooltip-content">a div is not a button ✨</div>
</div>
</div>
<p>However, if we want our <em>tooltip</em>, that is triggered when the interactive element is hovered or focused, we need JavaScript.<br>
We can display the tooltip by using <code>.hidePopover()</code> and <code>.showPopover()</code>.<br>
If <code>showPopover()</code> is called on an element with the popover attribute that is currently hidden, the element is added to the top rendering layer.</p>
<p>A tooltip usually disappears when hitting the Escape key or when the mouse is moved away from the interactive element.<br>
But it's also important to make sure that the tooltip content is reachable with the mouse pointer. That way, users can copy the text or read it with magnification software.<br>
That's why, with the help of JavaScript, we show the tooltip on <code>mouseover</code> of the interactive element and keep it visible when the tooltip itself is hovered (by also listening to <code>mouseover</code>).<br>
With <code>mouseout</code> we can hide the tooltip as soon as the mouse leaves either the tooltip or the interactive element that triggered it.</p>
<p>To open or close the tooltip with keyboard navigation, we must listen to the <code>focusin</code> and <code>focusout</code> events of the button.<br>
The tooltip must be easy to dismiss (e.g. by pressing the Escape key).<br>
It's also worth noting that tooltips don't actually get the focus themselves. The focus stays on the element that triggered the tooltip.<br>
However, it's content is still read to screen reader users and is accessible by the screen readers virtual cursor.<br>
But remember, in general, if we're showing content automatically when an element receives focus, it's important not to suddenly change context and confuse users.</p>
<h4>Wait, is this new attribute supported?</h4>
<p>Good news! The <code>popover</code> attribute is <a href="https://caniuse.com/?search=popover">supported by all modern browsers</a> with versions released between mid-2023 and 2024 (starting with Safari 17.0, Firefox 125, Chrome 114 and Edge 114).</p>
<h3 data-sanitized-id="looks-bad-though">Looks bad though</h3>
<p>That's why the last thing to do is use CSS to style the tooltip.<br>
If you want to change how the tooltip looks when it's displayed, you can use the <code>:popover-open</code> pseudo-class.</p>
<p>We also need to make sure the tooltip is correctly positioned.<br>
We can use <code>position-anchor</code> and <code>position-area</code> for Chrome and Edge, but they're still in the experimental phase, so we need an alternative for other browsers. The simplest option would be to use a library like <a href="https://floating-ui.com/">Floating UI</a>.</p>

<p>
  There is a
  
  <button type="button" aria-describedby="tooltip" data-sanitized-class="popoverbutton js-button">
      secret
  </button> to accessible HTML!
</p>

<div popover="" role="tooltip" data-sanitized-id="tooltip" data-sanitized-class="js-content">
  <div data-sanitized-class="tooltip-content">
    a div is not a button ✨
  </div>
</div>

<p>And that's it, you just created a custom tooltip!<br>
Find the detailed code in this <a href="https://codepen.io/dnikub/pen/PwYqwJE">CodePen</a>.</p>


guid: https://htmhell.dev/adventcalendar/2024/23/
title: The devil is in the &amp;lt;details&amp;gt;
author: ;Manuel Matuzovic
link: https://htmhell.dev/adventcalendar/2024/23/
hash: ��f��jI��W�uF8
attributes: {"enclosures":[]}
content:
by J. Pedro Ribeiro<br><p>Not too long ago, building an accordion component would require you to use a combination of JavaScript and CSS. If you've been around for as long as I have, you might have used a library like <a href="https://jqueryui.com/accordion/">jQuery</a> or <em>Mootools</em>.<br>
If you went <em>"vanilla"</em>, your code would look something like this:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>my-js-accordion<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>span</span><span data-sanitized-class="token punctuation">&gt;</span></span>Learn more about accordions<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>span</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>p</span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>hidden<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Accordions encapsulate content under a heading.<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>span</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<pre data-sanitized-class="language-css"><code data-sanitized-class="language-css"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token selector">.hidden</span> <span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token property">display</span><span data-sanitized-class="token punctuation">:</span> none<span data-sanitized-class="token punctuation">;</span> </span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span></span></code></pre>
<pre data-sanitized-class="language-js"><code data-sanitized-class="language-js"><span data-sanitized-class="highlight-line">document<span data-sanitized-class="token punctuation">.</span><span data-sanitized-class="token function">querySelectorAll</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token string">".my-js-accordion"</span><span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">.</span><span data-sanitized-class="token function">forEach</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token parameter">accordion</span><span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token operator">=&gt;</span><span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">  accordion<span data-sanitized-class="token punctuation">.</span><span data-sanitized-class="token function">querySelector</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token string">"span"</span><span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">.</span><span data-sanitized-class="token function">addEventListener</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token string">"click"</span><span data-sanitized-class="token punctuation">,</span> <span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token parameter">e</span><span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token operator">=&gt;</span><span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">    accordion<span data-sanitized-class="token punctuation">.</span><span data-sanitized-class="token function">querySelector</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token string">"p"</span><span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">.</span>classList<span data-sanitized-class="token punctuation">.</span><span data-sanitized-class="token function">toggle</span><span data-sanitized-class="token punctuation">(</span><span data-sanitized-class="token string">"hidden"</span><span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token punctuation">}</span><span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span><span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">;</span></span></code></pre>
<p>And it would work as you expected:</p>




<div data-sanitized-class="my-js-accordion ex1-js">
  <span>→ Learn more about accordions</span>
  <p data-sanitized-class="hidden">Accordions encapsulate content under a heading.</p>
</div>
<div data-sanitized-class="my-js-accordion ex1-js">
  <span>→ This one was built with JS and CSS</span>
  <p data-sanitized-class="hidden">We needed JavaScript and CSS to make this work. Click the heading again to close it.</p>
</div>
<div data-sanitized-class="my-js-accordion ex1-js">
  <span>→ Each accordion on this example works independently</span>
  <p data-sanitized-class="hidden">For any other advanced feature, more JavaScript will be needed.</p>
</div>

<p>The more adventurous would hack together some <code>input</code> and <code>label</code> elements together. With the help of <code>:checked</code> and some clever<br>
CSS selectors, you could achieve the same visual representation as the one above but without the need for JavaScript.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>my-css-accordion<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>checkbox<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>accordion1<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>label</span> <span data-sanitized-class="token attr-name">for</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>accordion1<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>→ Learn more about accordions<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>p</span><span data-sanitized-class="token punctuation">&gt;</span></span>Accordions encapsulate content under a heading.<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>p</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<pre data-sanitized-class="language-css"><code data-sanitized-class="language-css"><span data-sanitized-class="token selector">.my-css-accordion input[type="checkbox"],<br>.my-css-accordion p</span> <span data-sanitized-class="token punctuation">{</span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token property">display</span><span data-sanitized-class="token punctuation">:</span> none<span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span></span><br><span data-sanitized-class="highlight-line"></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token selector">.my-css-accordion input[type="checkbox"]:checked + label + p</span> <span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token property">display</span><span data-sanitized-class="token punctuation">:</span> block<span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span></span></code></pre>
<p>And it would be visually the same as the previous example:</p>



<div data-sanitized-class="my-css-accordion my-js-accordion">
  
  <label for="accordion1">→ Learn more about accordions</label>
  <p>Accordions encapsulate content under a heading.</p>
</div>
<div data-sanitized-class="my-css-accordion my-js-accordion">
  
  <label for="accordion2">→ This one was built without JavaScript</label>
  <p>Only CSS and HTML!</p>
</div>
<div data-sanitized-class="my-css-accordion my-js-accordion">
  
  <label for="accordion3">→ Same looks, same behaviour</label>
  <p>However, the code is slightly harder to maintain</p>
</div>
<p>These techniques work but there have some disadvantages: not only they're hard to maintain, they're also not accessible, and their reliance on JavaScript makes them not the ideal candidate for a modern web application.<br>
In summary, another case of <a href="https://www.htmhell.dev/">HTMLHell</a>.</p>
<h2 data-sanitized-id="here-comes-a-new-challenger">Here comes a new challenger</h2>
<p>Since 2020, all major browsers <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details#browser_compatibility">support</a> the <code>&lt;details&gt;</code> and its companion <code>&lt;summary&gt;</code> elements. Combined, they replace the need for JavaScript and CSS hacks to create an accordion component.<br>
We use the following syntax:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>details</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>summary</span><span data-sanitized-class="token punctuation">&gt;</span></span>Your heading goes here<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>summary</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>p</span><span data-sanitized-class="token punctuation">&gt;</span></span>Any content you like goes below the summary tag.<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>p</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>p</span><span data-sanitized-class="token punctuation">&gt;</span></span>As many elements as you need.<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>p</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>details</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>And it will work just like the previous examples, but with some added benefits:</p>
<ul>
<li>Less code ✅</li>
<li>Fully accessible ✅</li>
<li>Works without JavaScript ✅</li>
<li>No need for hacks ✅</li>
<li>Fully stylable ✅</li>
</ul>
<p>As seen below:</p>



<details data-sanitized-class="styled">
  <summary>Your heading goes here</summary>
  <p>Any content you like goes below the summary tag.</p>
  <p>As many elements as you need.</p>
</details>
<details data-sanitized-class="styled">
  <summary>This is the second heading</summary>
  <p>Any content you like goes below the summary tag.</p>
  <p>As many elements as you need.</p>
</details>
<details data-sanitized-class="styled">
  <summary>And the third entry it's here</summary>
  <p>Any content you like goes below the summary tag.</p>
  <p>As many elements as you need.</p>
</details>
<p>On the example above, each <code>&lt;details&gt;</code> element works independently of each other. But what if you want them to behave like true accordions, where only one can be opened at a time?</p>
<h2 data-sanitized-id="one-more-thing-exclusive-accordions">One More Thing... Exclusive Accordions</h2>
<p>Not too long ago, the <code>name</code> attribute was added to the <code>details</code> element.<br>
Similarly to the usage in the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio">radio input</a>, it allows you to group multiple elements together. This means we can have <em>exclusive</em> accordions: when only one can be opened at a time.</p>
<p>Here is an example of the usage:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>details</span> <span data-sanitized-class="token attr-name">name</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>my-accordion-group<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>...<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>details</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>details</span> <span data-sanitized-class="token attr-name">name</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>my-accordion-group<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>...<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>details</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>details</span> <span data-sanitized-class="token attr-name">name</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>my-accordion-group<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>...<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>details</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>Give the same <code>name</code> attribute to all the <code>details</code> elements you want to group together and they'll work as expected:</p>



<details name="group" data-sanitized-class="styled">
  <summary>3 separate entries</summary>
  <p>First block content.</p>
  <p>End of first block.</p>
</details>
<details name="group" data-sanitized-class="styled">
  <summary>Only one can be opened at a time</summary>
  <p>Second block content.</p>
  <p>End of second block.</p>
</details>
<details name="group" data-sanitized-class="styled">
  <summary>Still, no JS needed!</summary>
  <p>Third block content.</p>
  <p>End of third block.</p>
</details>
<p><strong>Note</strong>: It's worth highlighting that exclusive accordion come with some <em>drawbacks</em>, including poor UX on keyboard navigation and reduced usability for screen readers. Eric Eggert wrote about <a href="https://yatil.net/blog/exclusive-accordions">these issues</a>, offering some solutions and insights that are worth reading.</p>
<h2 data-sanitized-id="take-it-to-the-next-level">Take it to the next level</h2>
<p>Recently, Chrome 131 <a href="https://developer.chrome.com/blog/styling-details">added support</a> to new ways you can style both <code>&lt;details&gt;</code> and <code>&lt;summary&gt;</code> elements. Still early days but the future looks bright!<br>
Combine these features with some creative styling and you can create really complex components with accessibility and scalability built-in.</p>
<p>Further reading and examples:<br>
<a href="https://codepen.io/jpedroribeiro/pen/YzmxNYx">Code snippets</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details">MDN</a> | <a href="https://caniuse.com/details">Can I use</a> | <a href="https://web.dev/learn/html/details">web.dev</a></p>


guid: https://antonchaitkin.substack.com/p/a-history-guide-for-american-nationalists
title: A History Guide for American Nationalists
author: ;Anton Chaitkin
link: https://antonchaitkin.substack.com/p/a-history-guide-for-american-nationalists
hash: ��=z�~�� �݀�{�
content:
<div><img src="https://substackcdn.com/image/fetch/w_1200,h_600,c_fill,f_jpg,q_auto:good,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb526e061-61bd-43c3-a3b6-83a1ca331ddf_1113x583.png" data-sanitized-class="ff-og-image-inserted"></div><h3 data-sanitized-class="subtitle">By Anton Chaitkin; Copyright Anton Chaitkin.</h3><div dir="auto" data-sanitized-class="body markup">
<h3 data-sanitized-class="header-anchor-post">A History Guide for American Nationalists</h3>
<div data-sanitized-class="pencraft pc-display-flex pc-alignItems-center pc-position-absolute pc-reset header-anchor-parent">
<div data-sanitized-class="pencraft pc-display-contents pc-reset pubTheme-yiXxQA">
<div data-sanitized-id="§a-history-guide-for-american-nationalists" data-sanitized-class="pencraft pc-reset header-anchor offset-top">
<h3 data-sanitized-class="header-anchor-post"><button tabindex="0" type="button" data-href="https://antonchaitkin.substack.com/i/153453947/a-history-guide-for-american-nationalists" data-sanitized-class="pencraft pc-reset pencraft iconButton2-DvFP7w iconButtonBase-dJGHgN buttonBase-GK1x3M buttonNew-KfJF0Q size_sm-G3LciD priority_secondary-S63h9o"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></button></h3>
</div>
</div>
</div>
<p>By Anton Chaitkin; Copyright Anton Chaitkin.</p>
<p>The American people await the incoming presidency with hopes and fears.</p>
<p>Supporters hope Donald Trump will avert nuclear war, stop censorship, and restore the economy.</p>
<p>Opponents fear he will destroy civilization.</p>
<p>The new President can meet the needs of the whole people only…</p>
</div>

attributes:
{"enclosures":[{"url":"https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https://substack-post-media.s3.amazonaws.com/public/images/b526e061-61bd-43c3-a3b6-83a1ca331ddf_1113x583.png","type":"image/jpeg"}]}


guid: 6165d5e4ab2c8b5f79b5d82e:6165f805cc4a70035862ada3:67697efab1fe3a469fdf00a2
title: The new Alberta Bill of Rights won't protect much
author: ;Lisa P
link: https://www.rightsprobe.org/read/the-new-alberta-bill-of-rights-wont-protect-much
hash: �_a�.K����2�d�
content:
<p data-sanitized-class="">By Bruce Pardy | Special to the National Post</p><p data-sanitized-class="">In late November, the Alberta legislature <a href="https://www.assembly.ab.ca/assembly-business/bills/bill?billinfoid=12046&amp;from=bills"><span>passed</span></a> its newly improved Bill of Rights. The bill is a signature <a href="https://x.com/ABDanielleSmith/status/1851011932087783519"><span>plank</span></a> of Premier Danielle Smith’s United Conservative government. New provisions purport to guarantee rights to hold property, own firearms and prohibit vaccine mandates. Unfortunately, the bill may not do any of those things. In the end, it’s not likely to amount to a hill of beans.</p><p data-sanitized-class="">First enacted in 1972, the Alberta Bill of Rights has never been a bulwark against state action. Much like the Canadian Bill of Rights, courts have largely <a href="https://www.canlii.org/en/ab/abkb/doc/2023/2023abkb453/2023abkb453.html"><span>sidelined</span></a> it. Contrary to what some Albertans may expect, their newly amended Bill of Rights does not grant ironclad rights. At least four problems stand in the way.</p><p data-sanitized-class="">First problem: Like the Canadian Bill of Rights, the Alberta Bill of Rights is a statute and not a constitutional enactment like the Charter of Rights and Freedoms. No statute can limit the power of the legislature to pass new legislation that overrides, amends or repeals it. Future governments can explicitly breach the Bill of Rights. In fact, that’s what it <a href="https://docs.assembly.ab.ca/LADDAR_files/docs/bills/bill/legislature_31/session_1/20230530_bill-024.pdf#page=6"><span>says</span></a>: “The Legislature may expressly declare in an Act that a law of Alberta operates notwithstanding this Act.”</p><p data-sanitized-class="">That could at least pose a political impediment. Governments don’t like to announce that they are breaching rights. But transparency might not even be required. Under the Canadian Bill of Rights, courts have upheld statutes merely on the grounds that they had a “<a href="https://www.canlii.org/en/ca/scc/doc/1986/1986canlii24/1986canlii24.html"><span>valid federal objective</span></a>,” which is not a difficult threshold to meet. Only constitutions can “entrench” rights against future legislative action.</p><p data-sanitized-class="">The UCP could have made the provincial Bill of Rights part of the Alberta Constitution. Under Canada’s <a href="https://laws.justice.gc.ca/eng/Const/page-13.html#h-59"><span>Constitution Act of 1982</span></a>, provincial legislatures can amend their constitutions unilaterally. (Yes, Canadian provinces have their own constitutions.) A future Alberta legislature, of course, could amend it in turn, so nothing can be written in stone. But it would be trickier to legislate around a provincial constitution than a mere statute.</p><p data-sanitized-class="">Second problem: Some of the amendments don’t mean much. Rights protect against the law’s interference. But one section says that people have the right to possess firearms “in accordance with the law.” What’s the point of that? Not to mention that the federal government, to which the Alberta Bill of Rights does not apply, has jurisdiction to impose restrictions on guns. Another section says that people have the right to property “except to the extent authorized by law and except by due process of law.” That is, you have property rights until the law takes them away, which isn’t saying much.</p><p data-sanitized-class="">During COVID, courts held that measures like lockdowns and vaccine requirements did not violate Charter rights — or if they did, that they were permissible under the Charter’s reasonable limits clause. Smith has <a href="https://www.cbc.ca/news/canada/edmonton/proposed-changes-to-alberta-bill-of-rights-would-prohibit-vaccinations-without-consent-1.7366062"><span>said</span></a> that the unvaccinated were “the most discriminated-against group” she had seen in her lifetime. She had proposed to amend the <a href="https://calgary.ctvnews.ca/alberta-s-premier-wants-vaccine-status-to-be-a-human-right-critics-concerned-about-problems-it-could-pose-1.6113308"><span>Alberta Human Rights Act</span></a> (not the Bill of Rights) to prohibit private businesses and the government from discriminating on the grounds of vaccination status. But the UCP instead decided to amend the Bill of Rights, which applies to government only. They may have gotten cold feet about preventing discrimination in the private sector.</p><p data-sanitized-class="">The Alberta Bill of Rights includes a section on vaccines, but it may not change much. It <a href="https://docs.assembly.ab.ca/LADDAR_files/docs/bills/bill/legislature_31/session_1/20230530_bill-024.pdf#page=6"><span>says</span></a> that everyone has the right “not to be subjected to, or coerced into receiving, a vaccine without the consent of that individual.” The right to refuse medical treatment already exists, along with the right to give informed consent. “Not to be subjected to” doesn’t add anything. If you went to get a vaccine, signed the page and stuck out your arm, you gave legal consent. You may have done so reluctantly, but that does not vitiate your consent. (Whether your consent was informed is another question, but that is between you and the health-care practitioner who gave the shot.)</p><p data-sanitized-class="">What does “coerced into receiving” mean? Does it mean that governments can’t create vaccine requirements for spaces, services, schools or employment? Maybe, but maybe not. Coercion means being made to do something by force or the threat of force. Imprisonment is coercive. Being held down on a gurney is coercive. COVID authorities insisted that vaccine mandates and passports were not coercive because people had choices, even if those choices were bad. At best, the section is not clear. Even Alberta Justice Minister Mickey Amery, at a <a href="https://x.com/TrueNorthCentre/status/1851307491088290107"><span>press conference</span></a> in late October, was unwilling to say whether under the Bill of Rights no one would be required to get a vaccine. The bill could instead have said that everyone has a right to be unvaccinated to access any space, service, school or employment. Of course, even if it had, future governments could still get around it because the Bill of Rights is a statute, not part of a constitution.</p><p data-sanitized-class="">Third problem: The UCP chose to subject all rights protected by the Bill of Rights to “reasonable limits.” They included a clause that resembles the infamous “reasonable limits” clause in the <a href="https://laws.justice.gc.ca/eng/Const/page-12.html"><span>Charter</span></a>, upon which courts have relied in numerous cases to uphold legislation that breaches Charter rights.</p><p data-sanitized-class="">Fourth problem: Courts, not legislatures, control what rights mean. Bills of rights appear to give rights to the people, but what they really do is give power to courts. The rights have “internal limits” not identified in the text, especially where language is sparse and vague. No one knows where the line is in practice until the courts say. If the experience with the Charter is any indication, the rights set out in the Alberta Bill of Rights may not mean what its drafters intended.</p><p data-sanitized-class="">Smith deserves credit for her aspiration to give Albertans rights to resist state intrusions. But the proof of the pudding is in the eating. In this era of the hyperactive administrative state, keeping government at bay requires bold action that disrupts the prevailing order. The new Alberta Bill of Rights is more likely to be just one more signpost on the road to perdition.</p><p data-sanitized-class=""><a href="https://nationalpost.com/opinion/bruce-pardy-the-new-alberta-bill-of-rights-wont-protect-much" target="_blank">For the original version of this commentary, see the publisher’s website here</a>.</p>





















  
  



<hr>


  <p data-sanitized-class=""><em>Bruce Pardy is the executive director of </em><a href="https://www.rightsprobe.org/" target="_blank"><span><em>Rights Probe</em></span></a><em> and a professor of law at Queen’s University.</em></p><p data-sanitized-class="">Follow our journey.</p><p data-sanitized-class="">Subscribe to our newsletter: <a href="mailto:rightsprobe@protonmail.com?" target="_blank">rightsprobe@protonmail.com</a></p>

attributes:
{"enclosures":[{"url":"https://images.squarespace-cdn.com/content/v1/6165d5e4ab2c8b5f79b5d82e/1736778920033-27F1DFST91UEILN3BWCR/52828504356_c104623d98_c.jpg?format=1500w","title":"The new Alberta Bill of Rights won't protect much","type":"image/jpeg","medium":"image","height":593,"width":800}]}


guid: https://htmhell.dev/adventcalendar/2024/24/
title: The search input: They almost got it right
author: ;Manuel Matuzovic
link: https://htmhell.dev/adventcalendar/2024/24/
hash: mȍ�g���5�<xbP�a
attributes: {"enclosures":[]}
content:
by Steve Frenzel<br><p>This example is a classic - in a bad way - and can cause quite some confusion for users of assistive technology (AT). But it's also very easy to fix! It's the <code>&lt;input&gt;</code> element missing its dear friend, the <code>&lt;label&gt;</code>... 😭</p>
<h2 data-sanitized-id="bad-code">Bad code</h2>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">placeholder</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>Search<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token punctuation">/&gt;</span></span></span></code></pre>
<p>It's not relevant for this article, but here's the "button" to submit the content of the <code>&lt;input&gt;</code>:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>_icon_1f3oz_44<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>span</span> <span data-sanitized-class="token attr-name">title</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span><span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>gl-icon__wrapper<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">role</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>img<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>svg</span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>gl-icon<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">      <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>use</span> <span data-sanitized-class="token attr-name"><span data-sanitized-class="token namespace">xlink:</span>href</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>#search<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>use</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>svg</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>span</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>The cherry on top: It's not even wrapped inside a <code>&lt;form&gt;</code> element, so it's very likely that the submit is handled via JavaScript. 🍒</p>
<p>So what's the issue with this <code>&lt;input&gt;</code> element? In theory, having a <code>placeholder</code> instead of a <code>&lt;label&gt;</code> element is only a temporary solution! Once you've typed something, the placeholder gets replaced with whatever you've typed.</p>
<p>This could be a big issue for screen reader users. Let's check how different screen readers handle this kind of situation with different browsers.</p>
<p>You can do it yourself here: <a href="https://codepen.io/stvfrnzl/pen/jENPqxb">The search input: They almost got it right (bad code example)</a></p>
<p>What I checked was if the placeholder value still gets announced after typing something. I tested with macOS Sequoia 15.1.1 on December 1, 2024 using the latest versions of screen readers and browsers.</p>
<table>
<thead>
<tr>
<th></th>
<th>Google Chrome</th>
<th>Mozilla Firefox</th>
<th>Microsoft Edge</th>
<th>Apple Safari</th>
</tr>
</thead>
<tbody>
<tr>
<td>JAWS</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>n/a</td>
</tr>
<tr>
<td>NVDA</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>n/a</td>
</tr>
<tr>
<td>Narrator</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>n/a</td>
</tr>
<tr>
<td>VoiceOver</td>
<td>No</td>
<td>Yes</td>
<td>No</td>
<td>No</td>
</tr>
</tbody>
</table>
<p>Only VoiceOver had issues announcing announcing the <code>placeholder</code> attribute (except when using Firefox), which might be a bug! This issue has been mentioned back in 2017 for iOS at <a href="https://bugs.webkit.org/show_bug.cgi?id=170334">WebKit Bugzilla</a> and I wonder how long it's been present again on MacOS since then...</p>

<h2 data-sanitized-id="advantages-of-using-lesslabelgreater-instead-of-placeholder">Advantages of using <code>&lt;label&gt;</code> instead of <code>placeholder</code></h2>
<p>Even though almost all screen readers in this list seem to handle a missing <code>&lt;label&gt;</code> and a present <code>label</code> attribute well, there are still many reasons why you should do it the other way around:</p>
<h3 data-sanitized-id="reduce-cognitive-load">Reduce cognitive load</h3>
<p>Having a form with many inputs, no labels and only placeholders will make it very hard to remember the required information. This lacking clarity can place a huge burden on people having trouble to recall many things at once.</p>
<p>It will also make it harder to check against the requirements of the inputs, as the placeholder acting as a hint has been replaced with what you've typed. Therefore errors will be harder to fix, as you can't easily check against the requirement anymore.</p>
<p>Using a descriptive <code>&lt;label&gt;</code> can avoid these issues, as it's persistent.</p>
<h3 data-sanitized-id="avoid-flaky-browser-and-screen-reader-support">Avoid flaky browser and screen reader support</h3>
<p>Some older browsers might hide the placeholder text once the input is focused. And as you read earlier, some screen readers might have issues with a <code>placeholder</code> instead of a <code>&lt;label&gt;</code>.</p>
<p>Using a descriptive <code>&lt;label&gt;</code> can avoid these issues, as it has <a href="https://caniuse.com/mdn-html_elements_label">great browser support</a> and will be <a href="https://a11ysupport.io/tech/html/label_element">recognized by screen readers</a> as well.</p>
<h3 data-sanitized-id="increase-touch-target-size">Increase touch target size</h3>
<p>A <code>placeholder</code> is inside the text input. When using a mouse, this will be the only area you can click to focus this input. People with tremors might have a hard time doing that, depending on the size of the inputs and how close they're to each other.</p>
<p>Using a descriptive <code>&lt;label&gt;</code> can avoid these issues, as clicking it will focus the input.</p>
<p>For more reasons why, check out Adam Silver's article listed under <a href="https://htmhell.dev/adventcalendar/2024/24/#further-reading">Further reading</a>.</p>
<p>Enough of the theory, let's check out some working examples! You can find them here: <a href="https://codepen.io/stvfrnzl/pen/VYZLjLR">The search input: They almost got it right (good code examples)</a></p>
<h2 data-sanitized-id="1-good-code-with-explicit-label">1. Good code with explicit label</h2>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>label</span> <span data-sanitized-class="token attr-name">for</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search-input<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Search:<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search-input<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">name</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token punctuation">/&gt;</span></span></span></code></pre>
<p>This common approach provides a visual cue for the <code>&lt;input&gt;</code> element and can be processed by AT.</p>
<p>The <code>&lt;input&gt;</code> is now of <code>type="search"</code>, which should expose it as "searchbox" in the <a href="https://developer.mozilla.org/en-US/docs/Glossary/Accessibility_tree">accessibility tree</a>.</p>
<p>Clicking the label will also focus the input. This is a nice helper for sighted users and people with motor disabilities, as the target area for clicking has been increased.</p>
<p>Additionally, you can target this input now with CSS! This way you can check yourself that you implemented semantic and accessible HTML:</p>
<pre data-sanitized-class="language-css"><code data-sanitized-class="language-css"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token selector">input[type="search"]</span> <span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token comment">/* Your code */</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span></span></code></pre>
<p><code>for="search-input"</code> of <code>&lt;label&gt;</code> is referencing <code>id="search-input"</code> of <code>&lt;input&gt;</code>, so they're now "connected", if you will. AT should always announce the label of this input, no matter what you've typed.</p>
<p>The <code>name</code> attribute is useful when submitting the form, so you know which <code>&lt;input&gt;</code> contains what information.</p>
<p>If, for whatever reason, you don't want to show the visual label, you could also do it this way:</p>
<h2 data-sanitized-id="2-good-code-using-aria-label">2. Good code using <code>aria-label</code></h2>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">aria-label</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>Search<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search-input<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">name</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token punctuation">/&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>button</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>submit<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Search<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>There's no direct connection between <code>&lt;input&gt;</code> and <code>&lt;button&gt;</code>, but it is still of <code>type="search"</code> and has the accessible name "Search", which should give enough clues for AT users.</p>
<p>However, the only visual clue here is the button. So make sure it's close to the input, in order for people to make the mental connection. Not a fan of it though, as I would rather connect the two elements with each other:</p>
<h2 data-sanitized-id="3-good-code-using-aria-labelledby">3. Good code using <code>aria-labelledby</code></h2>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">aria-labelledby</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search-input<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">name</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token punctuation">/&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>button</span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search-input<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>submit<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Search<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>Still no visual cue, but whenever we change the <code>&lt;button&gt;</code> name, the accessible name of the <code>&lt;input&gt;</code> will change accordingly. The power of the <code>aria-labelledby</code> attribute! 💪 There's one more approach:</p>
<h2 data-sanitized-id="4-ok-code-with-implicit-label">4. OK code with implicit label</h2>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  Search:</span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">name</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token punctuation">/&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>As the <code>&lt;input&gt;</code> is wrapped inside the <code>&lt;label&gt;</code> element, they are both connected now. However, AT support for this solution might not be as good as an explicit label (see <a href="https://www.w3.org/WAI/tutorials/forms/labels/#associating-labels-implicitly">Associating labels implicitly</a>).</p>
<h2 data-sanitized-id="going-the-extra-mile-using-landmarks">Going the extra mile using landmarks</h2>
<p>To make it even easier for AT users to access the search functionality on your website, you could add <code>role="search"</code> to your <code>&lt;form&gt;</code> element, or wrap it inside the <code>&lt;search&gt;</code> <a href="https://developer.mozilla.org/en-US/blog/aria-accessibility-html-landmark-roles/">landmark</a>:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>form</span> <span data-sanitized-class="token attr-name">role</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>label</span> <span data-sanitized-class="token attr-name">for</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search-input<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Search:<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search-input<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">name</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token punctuation">/&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>form</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>This should announce the container as "search" in the accessibility tree, same goes for this approach:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>search</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>label</span> <span data-sanitized-class="token attr-name">for</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search-input<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Search:<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search-input<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">name</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>search<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token punctuation">/&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>search</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>When people are traversing the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model">DOM</a> using landmarks, this could help them find the search input on your website much quicker. And even if it's not announced as "search", you'd still have a very descriptive <code>&lt;label&gt;</code> element and a user input of <code>type="search"</code>.</p>
<h2 data-sanitized-id="conclusion">Conclusion</h2>
<p>All in all, this wasn't a very complex or time consuming fix and it will help people a lot to locate and use the search input on your website. Different approaches are possible, like using an implicit or explicit label, or even no visual label at all!</p>
<p>I personally like to use an explicit label, as it's a common pattern AND it's something you could target with CSS. Don't use an <code>&lt;input&gt;</code> element without a <code>&lt;label&gt;</code> or <code>aria-label</code>, as it comes with plenty of benefits for you and your users.</p>
<p>And wrapping an input inside a <code>&lt;form role="search"&gt;</code> or the <code>&lt;search&gt;</code> landmark will provide an extra hint for them, which could make it even easier to get there. So don't forget to always pair <code>&lt;input&gt;</code> with a <code>&lt;label&gt;</code>, they belong together and are the ultimate couple! ❤️</p>
<h2 data-sanitized-id="further-reading">Further reading</h2>
<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search"><code>&lt;input type="search"&gt;</code></a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input"><code>&lt;input&gt;</code>: The HTML Input element</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/search"><code>&lt;search&gt;</code>: The generic search element</a></li>
<li><a href="https://a11ysupport.io/">Accessibility Support: Will your code work with assistive technologies?</a></li>
<li><a href="https://adamsilver.io/blog/the-problem-with-placeholders-and-what-to-do-instead/">The problem with placeholders and what to do instead</a></li>
</ul>


guid: https://htmhell.dev/adventcalendar/2024/25/
title: Preloading fonts for web performance with link rel=&quot;preload&quot;
author: ;Manuel Matuzovic
link: https://htmhell.dev/adventcalendar/2024/25/
hash: }sm$7��h���·�
attributes: {"enclosures":[]}
content:
by Alistair Shepherd<br><p>Web performance is incredibly important. If you were here for the advent calendar last year you may have already read many of my thoughts on the subject. If not, read <a href="https://htmhell.dev/adventcalendar/2023/14/">Getting started with Web Performance</a> when you’re done here!</p>
<p>This year I’m back for more web performance, this time focusing on my favourite HTML snippet for <strong>improving the loading performance of web fonts using preloads</strong>. This short HTML snippet added to the <code>head</code> of your page, can make a substantial improvement to both perceived and measured performance.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>link</span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token attr-name">rel</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>preload<span data-sanitized-class="token punctuation">"</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token attr-name">href</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>/nova-sans.woff2<span data-sanitized-class="token punctuation">"</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token attr-name">as</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>font<span data-sanitized-class="token punctuation">"</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>font/woff2<span data-sanitized-class="token punctuation">"</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token attr-name">crossorigin</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>anonymous<span data-sanitized-class="token punctuation">"</span></span></span><br><span data-sanitized-class="token punctuation">&gt;</span></span></code></pre>
<p>Above we have a <code>link</code> element that instructs the browser to preload the <code>/nova-sans.woff2</code> font. By preloading your critical <em>above-the-fold</em> font we can make a huge impact by reducing potential flashes of unstyled or invisible text and layout shifts caused by font loading, like here in the following video:</p>
<figure>
  <video controls="controls" width="904" height="680" preload="none">
    <source src="https://htmhell.dev/adventcalendar/2024/25/no-preload.mp4" type="video/mp4">
  </video>
  <figcaption>Recording of a page load illustrating how a font loading late can result in a jarring layout shift</figcaption>
</figure>
<h2 data-sanitized-id="how-web-fonts-are-loaded">How web fonts are loaded</h2>
<p>To explain how preloading fonts can make such an impact, let’s go through the process of how web fonts are loaded. Font files are downloaded later than you may think, due to a combination of network requests and conservative browser behaviour.</p>
<p>In a standard web page, there will be the main HTML document which will include a CSS file using a <code>link</code> element in the <code>head</code>. If you’re using self-hosted custom fonts you’ll have a <code>@font-face</code> rule within your CSS that specifies the font name, the <code>src</code>, and possibly some other font-related properties.</p>
<p>In other CSS rules you specify a <code>font-family</code> so elements use your custom font.</p>
<p>Once our browser encounters our page it:</p>
<ol>
<li>Starts streaming the HTML document, parsing it as it goes</li>
<li>Encounters the <code>link</code> element pointing to our CSS file</li>
<li>Starts downloading that CSS file, blocking the render of the page until it’s complete</li>
<li>Parses and applies the contents of that file</li>
<li>Finds the <code>@font-face</code> rule with our font URL</li>
</ol>
<p>Okay let’s pause here for a moment —  It may make sense for step 6 to be <em>“Starts downloading our font file”</em>, however that’s not the case. You see, if a browser downloaded every font within a CSS file when it first encountered them, we could end up loading much more than is needed. We could be specifying fonts for multiple different weights, italics, other character sets/languages, or even multiple different fonts.</p>
<p>If we don’t need all these fonts immediately it would be wasteful to download them all, and doing so may slow down higher priority CSS or JS.</p>
<p>Instead, the browser is more conservative and simply takes note of the font declaration until it’s explicitly needed. The browser next:</p>
<ol start="6">
<li>Takes a note of our <code>@font-face</code> declarations and their URLs for later</li>
<li>Finishes processing CSS and starts rendering the page</li>
<li>Discovers a piece of text on the page that needs our font</li>
<li>Finally starts downloading our font now it knows it’s needed!</li>
</ol>
<p>So as we can see there’s actually a lot that happens between our HTML file arriving in the browser and our font file being downloaded. This is ideal for lower priority fonts, but for the main or headline font this process can make our custom font appear surprisingly late in the page load. This is what causes the behaviour we saw in the video above, where the page starts rendering but it takes some time before our custom font appears.</p>
<figure>
  <img src="https://htmhell.dev/adventcalendar/2024/25/no-preload.webp" width="1480" height="886" alt="A waterfall chart with type, url, and time columns. Listed below are assets that are loaded including an html document, CSS and JS files, a couple of images and a font file 'lobster.woff2'. It's all fairly standard and expected but the font doesn't even start loading until after the JS is complete at 2.0s, and doesn't finish until 3.0s" loading="lazy">
  <figcaption>A waterfall graph showing how our custom ‘lobster.woff2’ font doesn’t start being downloaded until 2 seconds into the page load and isn’t available until after 3 seconds</figcaption>
</figure>
<p>This is an intentional decision by browser makers and spec writers to ensure that pages with lots of fonts aren’t badly impacted by having to load many font files ahead of time. But that doesn’t mean it can’t be optimised!</p>
<h2 data-sanitized-id="preloading-our-font-with-a-link">Preloading our font with a link</h2>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>link</span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token attr-name">rel</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>preload<span data-sanitized-class="token punctuation">"</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token attr-name">href</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>/nova-sans.woff2<span data-sanitized-class="token punctuation">"</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token attr-name">as</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>font<span data-sanitized-class="token punctuation">"</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>font/woff2<span data-sanitized-class="token punctuation">"</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token attr-name">crossorigin</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>anonymous<span data-sanitized-class="token punctuation">"</span></span></span><br><span data-sanitized-class="token punctuation">&gt;</span></span></code></pre>
<p>The purpose of my favourite HTML snippet is to inform the browser that this font file will be needed with high priority, before it even has knowledge of it. We’re building our page and know more about how our fonts are used — so we can provide hints to be less conservative! If we start downloading the font as soon as possible then it can be ready ahead of when the browser ‘realises’ it’s needed.</p>
<p>Looking back at our list above, by adding a preload we move the start of the font download from step 9 to step 2!</p>
<ol>
<li>Starts streaming the HTML document, parsing it as it goes</li>
<li>Encounters our preload and starts downloading our font file in the background</li>
<li>Encounters the <code>link</code> element pointing to our CSS file</li>
<li><em>Continues as above</em></li>
</ol>
<p>Taking a closer look at the snippet, we’re using a <code>link</code> element and <code>rel="preload"</code> to ask the browser to preload a file with the intention of using it early in the page load. Like a CSS file, we provide the URL with the <code>href</code> attribute.</p>
<p>We use <code>as="font"</code> and <code>type="font/woff2"</code> to indicate this is a font file in <code>woff2</code>. For modern browsers <code>woff2</code> is the only format you need as it’s universally supported.</p>
<p>Finally there’s <code>crossorigin="anonymous"</code>. This comes from the wonderfully transparent and clear world of Cross Origin Resource Sharing. I jest of course, CORS is anything but transparent and clear!</p>
<p>For fonts you almost always want <code>crossorigin="anonymous"</code> on your link element, <strong>even when the request isn’t cross-origin</strong>. Omitting this attribute would mean our preload wouldn’t be used and the file would be requested again. But why?</p>
<p>Browser requests can be sent either with or without credentials (cookies, etc), and requests to the same URL with and without credentials are fundamentally different. <strong>For a preload to be used by the browser, it needs to match the type of request that the browser would have made normally.</strong> By default fonts are always requested without credentials, so we need to add <code>crossorigin="anonymous"</code> to ensure our preload matches a normal font request.</p>
<p>By omitting this attribute our preload would not be used and the browser would request the font again. If you’re ever unsure of how your preloads are working, check your browsers’ devtools. In Chrome the Network pane will show a duplicate request, and the Console will log a warning telling you a preload wasn’t used.</p>
<figure>
  <img src="https://htmhell.dev/adventcalendar/2024/25/chrome-devtools.webp" width="1480" height="536" alt="Screenshot of Google Chrome devtools 'Console' pane. There are two warnings: 1. 'A preload for 'http://localhost:3000/lobster.woff2' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.'; 2. 'The resource http://localhost: 3000/lobster.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.'" loading="lazy">
  <figcaption>Screenshot showing the Chrome devtools Console pane, with warnings for an incorrect font preload</figcaption>
</figure>
<h2 data-sanitized-id="result-and-conclusion">Result and conclusion</h2>
<p>By preloading our critical fonts we ensure our browser has the most important fonts available earlier in the page loading process. We can see this by comparing our recording and waterfall charts from earlier:</p>
<figure>
  <video controls="controls" width="1808" height="680" preload="none">
    <source src="https://htmhell.dev/adventcalendar/2024/25/side-by-side.mp4" type="video/mp4">
  </video>
  <figcaption>Side-by-side recording of the same page loading in different ways. ‘no-preload’ shows a large layout shift caused by the font switching and finishes loading at 4.4s. ‘preload’ doesn’t have a shift and finishes loading at 3.1s.</figcaption>
</figure>
<figure>
  <img src="https://htmhell.dev/adventcalendar/2024/25/side-by-side.webp" width="1480" height="440" alt="A side-by-side of two waterfall charts including type, url and time columns. On one side is 'no-preload' and the other is 'preload'. The key difference is that in 'no-preload' a font doesn't start loading until way after everything else at 2.0s. In 'preload' it loads very early, alongside other assets. Because of this the page finishes loading much earlier." loading="lazy">
  <figcaption>Side-by-side comparison of two waterfall charts of the same site with font file `lobster.woff2`. For the ‘no-preload’ document the font loads after all other assets and finishes at 3s. The ‘preload’ document shows the font loading much earlier, in parallel with other files and finishing at 2s.</figcaption>
</figure>
<p>As I mentioned in <a href="https://htmhell.dev/adventcalendar/2023/14/">Getting started with Web Performance</a>, it’s best to use preloads sparingly so limit this to your most important font or two. Remember that it’s a balance. By preloading too many resources you run the risk of other high-priority resources such as CSS being slowed down and arriving late. I would recommend preloading just the heading font to start with. With some testing you can see if preloading your main body font is worth it also!</p>
<p>With care, font preloads can be a simple and impactful optimisation opportunity and this is why it’s my favourite HTML snippet! This is a great step to improving font loading, and there are <a href="https://htmhell.dev/adventcalendar/2023/14/#6-be-bold-optimise-your-fonts">plenty of other web font optimisations</a> to try also!</p>


guid: https://htmhell.dev/adventcalendar/2024/26/
title: The underrated &amp;lt;dl&amp;gt; element
author: ;Manuel Matuzovic
link: https://htmhell.dev/adventcalendar/2024/26/
hash: �S�Y�0 �i�%�
attributes: {"enclosures":[]}
content:
by David Luhr<br><p>The <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl">Description List (<code>&lt;dl&gt;</code>) element</a> is useful for many common visual design patterns, but is unfortunately underutilized.</p>
<p>It was originally intended to group terms with their definitions, but it's also a great fit for other content that has a key/value structure, such as product attributes or cards that have several supporting details.</p>
<p>Developers often mark up these patterns with overused heading or table semantics, or neglect semantics entirely. With the Description List (<code>&lt;dl&gt;</code>) element and its dedicated Description Term (<code>&lt;dt&gt;</code>) and Description Definition (<code>&lt;dd&gt;</code>) elements, we can improve the semantics and accessibility of these design patterns.</p>
<p>The <code>&lt;dl&gt;</code> has a unique content model:</p>
<ul>
<li>A parent <code>&lt;dl&gt;</code> containing one or more groups of <code>&lt;dt&gt;</code> and <code>&lt;dd&gt;</code> elements</li>
<li>Each term/definition group can have multiple <code>&lt;dt&gt;</code> (Description Term) elements per <code>&lt;dd&gt;</code> (Description Definition) element, or multiple definitions per term</li>
<li>The <code>&lt;dl&gt;</code> can optionally accept a single layer of <code>&lt;div&gt;</code> to wrap the <code>&lt;dt&gt;</code> and <code>&lt;dd&gt;</code> elements, which can be useful for styling</li>
</ul>
<h2 data-sanitized-id="examples">Examples</h2>
<p>An initial example would be a simple list of terms and definitions:</p>
<p><img src="https://htmhell.dev/adventcalendar/2024/26/terms-and-definitions.jpg" alt="Example design with bold text terms followed by regular text definitions."></p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dl</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dt</span><span data-sanitized-class="token punctuation">&gt;</span></span>Compression damping<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dt</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dd</span><span data-sanitized-class="token punctuation">&gt;</span></span>Controls the rate a spring compresses when it experiences a force<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dd</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dt</span><span data-sanitized-class="token punctuation">&gt;</span></span>Rebound damping<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dt</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dd</span><span data-sanitized-class="token punctuation">&gt;</span></span>Controls the rate a spring returns to it's extended length after compressing<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dd</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dl</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>A common design pattern is "stat callouts", which feature mini cards of small label text above large numeric values. The <code>&lt;dl&gt;</code> is a great fit for this content:</p>
<p><img src="https://htmhell.dev/adventcalendar/2024/26/stat-callouts.jpg" alt="Example design with 3 groupings of small label text above large, bold number values."></p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dl</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dt</span><span data-sanitized-class="token punctuation">&gt;</span></span>Founded<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dt</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dd</span><span data-sanitized-class="token punctuation">&gt;</span></span>1988<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dd</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dt</span><span data-sanitized-class="token punctuation">&gt;</span></span>Frames built<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dt</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dd</span><span data-sanitized-class="token punctuation">&gt;</span></span>8,678<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dd</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dt</span><span data-sanitized-class="token punctuation">&gt;</span></span>Race podiums<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dt</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dd</span><span data-sanitized-class="token punctuation">&gt;</span></span>212<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dd</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dl</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>And, a final example of a product listing, which has a list of technical specs:</p>
<p><img src="https://htmhell.dev/adventcalendar/2024/26/product-details.jpg" alt="Example design a large placeholder image next to a product title and a key/value list of product details."></p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>h2</span><span data-sanitized-class="token punctuation">&gt;</span></span>Downhill MTB<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>h2</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dl</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dt</span><span data-sanitized-class="token punctuation">&gt;</span></span>Front travel:<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dt</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dd</span><span data-sanitized-class="token punctuation">&gt;</span></span>160mm<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dd</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dt</span><span data-sanitized-class="token punctuation">&gt;</span></span>Wheel size:<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dt</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dd</span><span data-sanitized-class="token punctuation">&gt;</span></span>27.5"<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dd</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dt</span><span data-sanitized-class="token punctuation">&gt;</span></span>Weight:<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dt</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">		<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>dd</span><span data-sanitized-class="token punctuation">&gt;</span></span>15.2 kg<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dd</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">	<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>div</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>dl</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<h2 data-sanitized-id="accessibility">Accessibility</h2>
<p>With this markup in place, <a href="https://a11ysupport.io/tech/html/dl_element">common screen readers will convey important semantic and navigational information</a>. In my testing, NVDA on Windows and VoiceOver on MacOS conveyed a list role, the count of list items, your position in the list, and the boundaries of the list. TalkBack on Android only conveyed the term and definition roles of the <code>&lt;dt&gt;</code> and <code>&lt;dd&gt;</code> elements, respectively.</p>
<p>If the design doesn't include visible labels, you can at least include them as visually hidden text for assistive technology users. But, I always advocate to visually display them if possible.</p>
<h2 data-sanitized-id="wrapping-up">Wrapping up</h2>
<p>The <code>&lt;dl&gt;</code> is a versatile element that unfortunately doesn't get much use. In over a decade of coding, I've almost never encountered it in existing codebases. It also doesn't appear anywhere in the top HTML elements lists in <a href="https://almanac.httparchive.org/en/2024/markup#element-diversity">the Web Almanac 2024</a> or <a href="https://www.advancedwebranking.com/seo/html-study">an Advanced Web Ranking study of over 11.3 million pages</a>. The next time you're building out a design, look for opportunities where the underrated Description List is a good fit.</p>
<p>To go deeper, be sure to check out this <a href="https://benmyers.dev/blog/on-the-dl/">article by Ben Myers on the <code>&lt;dl&gt;</code> element</a>.</p>


guid: https://htmhell.dev/adventcalendar/2024/27/
title: Misleading Icons: Icon-Only-Buttons and Their Impact on Screen Readers
author: ;Manuel Matuzovic
link: https://htmhell.dev/adventcalendar/2024/27/
hash: �fa�f{ː�˗Y��
attributes: {"enclosures":[]}
content:
by Alexander Muzenhardt<br><h2 data-sanitized-id="introduction">Introduction</h2>
<p>Imagine you’re tasked with building a cool new feature for a product. You dive into the work with full energy, and just before the deadline, you manage to finish it. Everyone loves your work, and the feature is set to go live the next day.<br>
A few days later, you receive an email from a user who can’t access the new feature. The user points out that they don’t understand what the button does. What do they mean? You review your code, locate the button, and start digging into the problem.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>i</span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>icon<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>📆<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>i</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<h2 data-sanitized-id="the-problem">The Problem</h2>
<p>You find some good resources explaining that there are people with disabilities who need to be considered in these cases. This is known as accessibility. For example, some individuals have motor impairments and cannot use a mouse. In this particular case, the user is visually impaired and relies on assistive technology like a screen reader, which reads aloud the content of the website or software. The button you implemented doesn’t have any descriptive text, so only the icon is read aloud. In your case, the screen reader says, “Tear-Off Calendar button”. While it describes the appearance of the icon, it doesn’t convey the purpose of the button. This information is meaningless to the user. A button should always describe what action it will trigger when activated. That’s why we need additional descriptive text.</p>
<h2 data-sanitized-id="the-challenge">The Challenge</h2>
<p>Okay, you understand the problem now and agree that it should be fixed. However, you don’t want to add visible text to the button. For design and aesthetic reasons, sighted users should only see the icon. Is there a way to keep the button “icon-only” while still providing a meaningful, descriptive text for users who rely on assistive technologies like screen readers?</p>
<h2 data-sanitized-id="the-solution">The Solution</h2>
<p>First, you need to give the button a descriptive name so that a screen reader can announce it.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>span</span><span data-sanitized-class="token punctuation">&gt;</span></span>Open Calendar<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>span</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>i</span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>icon<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>📆<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>i</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>The problem now is that the button’s name becomes visible, which goes against your design guidelines. To prevent this, additional CSS is required.</p>
<pre data-sanitized-class="language-css"><code data-sanitized-class="language-css"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token selector">.sr-only</span> <span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token property">position</span><span data-sanitized-class="token punctuation">:</span> absolute<span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token property">width</span><span data-sanitized-class="token punctuation">:</span> 1px<span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token property">height</span><span data-sanitized-class="token punctuation">:</span> 1px<span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token property">padding</span><span data-sanitized-class="token punctuation">:</span> 0<span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token property">margin</span><span data-sanitized-class="token punctuation">:</span> -1px<span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token property">overflow</span><span data-sanitized-class="token punctuation">:</span> hidden<span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token property">clip</span><span data-sanitized-class="token punctuation">:</span> <span data-sanitized-class="token function">rect</span><span data-sanitized-class="token punctuation">(</span>0<span data-sanitized-class="token punctuation">,</span> 0<span data-sanitized-class="token punctuation">,</span> 0<span data-sanitized-class="token punctuation">,</span> 0<span data-sanitized-class="token punctuation">)</span><span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token property">white-space</span><span data-sanitized-class="token punctuation">:</span> nowrap<span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token property">border-width</span><span data-sanitized-class="token punctuation">:</span> 0<span data-sanitized-class="token punctuation">;</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span></span></code></pre>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>span</span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>sr-only<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Open Calendar<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>span</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>i</span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>icon<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>📆<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>i</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>The CSS ensures that the text inside the span-element is hidden from sighted users but remains readable for screen readers. This approach is so common that well-known CSS libraries like TailwindCSS, Bootstrap, and Material-UI include such a class by default.</p>
<p>Although the text of the buttons is not visible anymore, the entire content of the button will be read aloud, including the icon — something you want to avoid.</p>
<p>In HTML you are allowed to use specific attributes for accessibility, and in this case, the attribute <strong>aria-hidden</strong> is what you need. ARIA stands for “Accessible Rich Internet Applications” and is an initiative to make websites and software more accessible to people with disabilities.</p>
<p>The attribute <strong>aria-hidden</strong> hides elements from screen readers so that their content isn’t read. All you need to do is add the attribute <strong>aria-hidden</strong> with the value “true” to the icon element, which in this case is the “i”-element.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>span</span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>sr-only<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Open Calendar<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>span</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>i</span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>icon<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">aria-hidden</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>true<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>📆<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>i</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<h2 data-sanitized-id="alternative">Alternative</h2>
<p>An alternative is the attribute <strong>aria-label</strong>, which you can assign a descriptive, accessible text to a button without it being visible to sighted users. The purpose of <strong>aria-label</strong> is to provide a description for interactive elements that lack a visible label or descriptive text. All you need to do is add the attribute <strong>aria-label</strong> to the button. The attribute <strong>aria-hidden</strong> and the span-Element can be deleted.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>button</span> <span data-sanitized-class="token attr-name">aria-label</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>Open Calendar<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>i</span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>icon<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>📆<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>i</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>button</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<p>With this adjustment, the screen reader will now announce “Open calendar,” completely ignoring the icon. This clearly communicates to the user what the button will do when clicked.</p>
<h2 data-sanitized-id="which-option-should-you-use?">Which Option Should You Use?</h2>
<p>At first glance, the aria-label approach might seem like the smarter choice. It requires less code, reducing the likelihood of errors, and looks cleaner overall, potentially improving code readability.</p>
<p>However, the first option is actually the better choice. There are several reasons for this that may not be immediately obvious:</p>
<ul>
<li>Some browsers do not translate aria-label</li>
<li>It is difficult to copy aria-label content or otherwise manipulated it as text</li>
<li>aria-label content will not show up if styles fail to load</li>
</ul>
<p>These are just a few of the many reasons why you should be cautious when using the aria-label attribute. These points, along with others, are discussed in detail in the excellent article "<a href="https://ericwbailey.website/published/aria-label-is-a-code-smell">aria-label is a Code Smell</a>" by <a href="https://github.com/ericwbailey/ericwbailey.website">Eric Bailey</a>.</p>
<h2 data-sanitized-id="the-first-rule-of-aria-use">The First Rule of ARIA Use</h2>
<p>The “<a href="https://www.w3.org/TR/using-aria/#firstrule">First Rule of ARIA Use</a>” states:</p>
<p>If you can use a native HTML element or attribute with the semantics and behavior you require already built in, instead of re-purposing an element and adding an ARIA role, state or property to make it accessible, then do so.</p>
<p>Even though the first approach also uses an ARIA attribute, it is more acceptable because <strong>aria-hidden</strong> only hides an element from screen readers. In contrast, <strong>aria-label</strong> overrides the standard HTML behavior for handling descriptive names. For this reason, following this principle, <strong>aria-hidden</strong> is preferable to <strong>aria-label</strong> in this case.</p>
<h2 data-sanitized-id="browser-compatibility">Browser compatibility</h2>
<p>Both <strong>aria-label</strong> and <strong>aria-hidden</strong> are supported by all modern browsers and can be used without concern.</p>
<h2 data-sanitized-id="conclusion">Conclusion</h2>
<p>Ensuring accessibility in web design is more than just a nice-to-have—it’s a necessity. By implementing simple solutions like combining CSS with <strong>aria-hidden</strong>, you can create a user experience that is both aesthetically pleasing and accessible for everyone, including those who rely on screen readers. While there may be different approaches to solving accessibility challenges, the key is to be mindful of all users' needs. A few small adjustments can make a world of difference, ensuring that your features are truly usable by everyone.</p>
<p>Cheers<br>
Alex</p>
<h1>Resources / Links</h1>
<ul>
<li><a href="https://www.compart.com/en/unicode/U+1F4C6">Unicode Character “Tear-Off Calendar”</a></li>
<li><a href="https://www.compart.com/en/unicode/">comport Unicode Website</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label">mdn web docs aria-label</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-hidden">mdn web docs aria-hidden</a></li>
<li><a href="https://www.w3.org/WAI/standards-guidelines/aria/">WAI-ARIA Standard Guidlines</a></li>
<li><a href="https://tailwindcss.com/docs/screen-readers">Tailwind CSS Screen Readers (sr-only)</a></li>
<li><a href="https://ericwbailey.website/published/aria-label-is-a-code-smell">aria-label is a Code Smell</a></li>
<li><a href="https://www.w3.org/TR/using-aria/#firstrule">First Rule of ARIA Use</a></li>
</ul>


guid: https://htmhell.dev/adventcalendar/2024/28/
title: Boost website speed with prefetching and the Speculation Rules API
author: ;Manuel Matuzovic
link: https://htmhell.dev/adventcalendar/2024/28/
hash: dT��=������!
attributes: {"enclosures":[]}
content:
by Schepp<br><p>Everybody loves fast websites, and everyone despises slow ones even more. Site speed significantly contributes to the overall user experience (UX), determining whether it feels positive or negative. To ensure the fastest possible page load times, it’s crucial to design with performance in mind. However, performance optimization is an art form in itself. While implementing straightforward techniques like file compression or proper cache headers is relatively easy, achieving deeper optimizations can quickly become complex.</p>
<p>But what if, instead of solely trying to accelerate the loading process, we triggered it earlier—without the user noticing?</p>
<p>One way to achieve this is by prefetching pages the user might navigate to next using <code>&lt;link rel="prefetch"&gt;</code> tags. These tags are typically embedded in your HTML, but they can also be generated dynamically via JavaScript, based on a heuristic of your choice. Alternatively, you can send them as an <a href="https://www.debugbear.com/blog/resource-hints-rel-preload-prefetch-preconnect#resource-hints-in-http-headers">HTTP <code>Link</code> header</a> if you lack access to the HTML code but can modify the server configuration. Browsers will take note of the prefetch directives and fetch the referenced pages as needed.</p>
<aside data-sanitized-class="info">
<p><em><strong>⚠︎ Caveat:</strong> To benefit from this prefetching technique, you must allow the browser to cache pages temporarily using the <code>Cache-Control</code> HTTP header. For example, <code>Cache-Control: max-age=300</code> would tell the browser to cache a page for five minutes. Without such a header, the browser will discard the pre-fetched resource and fetch it again upon navigation, rendering the prefetch ineffective.</em></p>
</aside>
<p>In addition to <code>&lt;link rel="prefetch"&gt;</code>, Chromium-based browsers support <code>&lt;link rel="prerender"&gt;</code>. This tag is essentially a supercharged version of <code>&lt;link rel="prefetch"&gt;</code>. Known as "<a href="https://developer.chrome.com/blog/nostate-prefetch">NoState Prefetch</a>," it not only prefetches an HTML page but also scans it for subresources—stylesheets, JavaScript files, images, and fonts referenced via a <code>&lt;link rel="preload" as="font" crossorigin&gt;</code> — loading them as well.</p>
<h3 data-sanitized-id="the-speculation-rules-api">The Speculation Rules API</h3>
<p>A relatively new addition to Chromium browsers is the <strong>Speculation Rules API</strong>, which offers enhanced prefetching and enables actual prerendering of webpages. It introduces a JSON-based syntax for precisely defining the conditions under which preprocessing should occur.</p>
<p>Here’s a simple example of how to use it:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>script</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>speculationrules<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span><span data-sanitized-class="token script"><span data-sanitized-class="token language-javascript"><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token string">"prerender"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token punctuation">[</span><span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token string">"urls"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token punctuation">[</span><span data-sanitized-class="token string">"next.html"</span><span data-sanitized-class="token punctuation">,</span> <span data-sanitized-class="token string">"next2.html"</span><span data-sanitized-class="token punctuation">]</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token punctuation">}</span><span data-sanitized-class="token punctuation">]</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span></span><br></span></span><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>script</span><span data-sanitized-class="token punctuation">&gt;</span></span></code></pre>
<aside data-sanitized-class="info">
<p>Alternatively, you can place the JSON file on your server and reference it using an HTTP header: <code>Speculation-Rules: "/speculationrules.json"</code>.</p>
</aside>
<p>The above <code>list</code>-rule specifies that the browser should prerender the URLs <code>next.html</code> and <code>next2.html</code> so they are ready for instant navigation. The keyword <code>prerender</code> means more than fetching the HTML and subresources—it instructs the browser to fully render the pages in hidden tabs, ready to replace the current page instantly when needed. This makes navigation to these pages feel seamless.</p>
<p>Prerendered pages also typically score excellent Core Web Vital metrics. Layout shifts and image loading occur during the hidden prerendering phase, and JavaScript execution happens upfront, ensuring a smooth experience when the user first sees the page.</p>
<p>Instead of listing specific URLs, the API also allows for pattern matching using <code>where</code> and <code>href_matches</code> keys:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>script</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>speculationrules<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span><span data-sanitized-class="token script"><span data-sanitized-class="token language-javascript"><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token string">"prerender"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token punctuation">[</span><span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token string">"where"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token punctuation">{</span> <span data-sanitized-class="token string">"href_matches"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token string">"/*"</span> <span data-sanitized-class="token punctuation">}</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token punctuation">}</span><span data-sanitized-class="token punctuation">]</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span></span><br></span></span><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>script</span><span data-sanitized-class="token punctuation">&gt;</span></span></code></pre>
<p>For more precise targeting, CSS selectors can be used with the <code>selector_matches</code> key:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>script</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>speculationrules<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span><span data-sanitized-class="token script"><span data-sanitized-class="token language-javascript"><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token string">"prerender"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token punctuation">[</span><span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token string">"where"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token punctuation">{</span> <span data-sanitized-class="token string">"selector_matches"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token string">".navigation__link"</span> <span data-sanitized-class="token punctuation">}</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token punctuation">}</span><span data-sanitized-class="token punctuation">]</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span></span><br></span></span><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>script</span><span data-sanitized-class="token punctuation">&gt;</span></span></code></pre>
<p>These rules, called <code>document</code>-rules, act on link elements as soon as the user triggers a <code>pointerdown</code> or <code>touchstart</code> event, giving the referenced pages a few milliseconds' head start before the actual navigation.</p>
<p>If you want the preprocessing to begin even earlier, you can adjust the <code>eagerness</code> setting:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>script</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>speculationrules<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span><span data-sanitized-class="token script"><span data-sanitized-class="token language-javascript"><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token string">"prerender"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token punctuation">[</span><span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token string">"where"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token punctuation">{</span> <span data-sanitized-class="token string">"href_matches"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token string">"/*"</span> <span data-sanitized-class="token punctuation">}</span><span data-sanitized-class="token punctuation">,</span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token string">"eagerness"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token string">"moderate"</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token punctuation">}</span><span data-sanitized-class="token punctuation">]</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span></span><br></span></span><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>script</span><span data-sanitized-class="token punctuation">&gt;</span></span></code></pre>
<p><strong>Eagerness values:</strong></p>
<ul>
<li><code>immediate</code>: Executes immediately.</li>
<li><code>eager</code>: Currently behaves like <code>immediate</code> but may be refined to sit between <code>immediate</code> and <code>moderate</code>.</li>
<li><code>moderate</code>: Executes after a 200ms hover or on <code>pointerdown</code> for mobile devices.</li>
<li><code>conservative</code> (default): Speculates based on pointer or touch interaction.</li>
</ul>
<p>For even greater flexibility, you can combine <code>prerender</code> and <code>prefetch</code> rules with different eagerness settings:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>script</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>speculationrules<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span><span data-sanitized-class="token script"><span data-sanitized-class="token language-javascript"><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token string">"prerender"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token punctuation">[</span><span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token string">"where"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token punctuation">{</span> <span data-sanitized-class="token string">"href_matches"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token string">"/*"</span> <span data-sanitized-class="token punctuation">}</span><span data-sanitized-class="token punctuation">,</span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token string">"eagerness"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token string">"conservative"</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token punctuation">}</span><span data-sanitized-class="token punctuation">]</span><span data-sanitized-class="token punctuation">,</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token string">"prefetch"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token punctuation">[</span><span data-sanitized-class="token punctuation">{</span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token string">"where"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token punctuation">{</span> <span data-sanitized-class="token string">"href_matches"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token string">"/*"</span> <span data-sanitized-class="token punctuation">}</span><span data-sanitized-class="token punctuation">,</span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token string">"eagerness"</span><span data-sanitized-class="token operator">:</span> <span data-sanitized-class="token string">"moderate"</span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token punctuation">}</span><span data-sanitized-class="token punctuation">]</span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token punctuation">}</span></span><br></span></span><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>script</span><span data-sanitized-class="token punctuation">&gt;</span></span></code></pre>
<h3 data-sanitized-id="limitations-and-challenges">Limitations and Challenges</h3>
<p>While the Speculation Rules API is powerful, it comes with some limitations:</p>
<ol>
<li><strong>Browser support:</strong> Only Chromium-based browsers support it. Other browsers lack this capability, so treat it as a progressive enhancement.</li>
<li><strong>Bandwidth concerns:</strong> Over-aggressive settings could waste user bandwidth. Chromium imposes limits to mitigate this: a maximum of 10 prerendered and 50 prefetched pages with <code>immediate</code> or <code>eager</code> eagerness.</li>
<li><strong>Server strain:</strong> Poorly optimized servers (e.g., no caching, heavy database dependencies) may experience significant load increases due to excessive speculative requests.</li>
<li><strong>Compatibility:</strong> Prefetching won’t work if a Service Worker is active, though prerendering remains unaffected. Cross-origin prerendering requires explicit opt-in by the target page.</li>
</ol>
<p>Despite these caveats, the Speculation Rules API offers a powerful toolset to significantly enhance perceived performance and improve UX. So go ahead and try them out!</p>
<p><em>I would like to express a big thank you to the Webperf community for always being ready to help with great tips and expertise. For this article, I would like to thank Barry Pollard, Andy Davies, and Noam Rosenthal in particular for providing very valuable background information. ❤️</em></p>


guid: CCAL-118hcal-2024-12-31
title: House Calendars, DAILY - House Calendars for December 31, 2024 - 118th Congress, 2nd Session
link: https://www.govinfo.gov/app/details/CCAL-118hcal-2024-12-31
hash: �{3� �!��6��I
tags: #Proceedings of Congress and General Congressional Publications
attributes: {"enclosures":[]}
content:
<h2>Content Files</h2>
 <a href="https://www.govinfo.gov/content/pkg/CCAL-118hcal-2024-12-31/pdf/CCAL-118hcal-2024-12-31.pdf">PDF</a><br>
 
 
 
 
 <h2>Metadata download</h2>
 <a href="https://www.govinfo.gov/metadata/pkg/CCAL-118hcal-2024-12-31/mods.xml">Descriptive Metadata (MODS)</a><br>
 <a href="https://www.govinfo.gov/metadata/pkg/CCAL-118hcal-2024-12-31/premis.xml">Preservation Metadata (PREMIS)</a><br>
 <h2>All Content and Metadata files, including granules</h2> <a href="https://www.govinfo.gov/content/pkg/CCAL-118hcal-2024-12-31.zip">ZIP</a>


guid: https://htmhell.dev/adventcalendar/2024/29/
title: datalists are more powerful than you think
author: ;Manuel Matuzovic
link: https://htmhell.dev/adventcalendar/2024/29/
hash: 2�ohj��1x�Y�}�b
attributes: {"enclosures":[]}
content:
by Alexis Degryse<br><p>I think we all know the <code>&lt;datalist&gt;</code> element (and if you don’t, it’s ok). It holds a list of <code>&lt;option&gt;</code> elements, offering suggested choices for its associated input field.</p>
<p>It’s not an alternative for the <code>&lt;select&gt;</code> element. A field associated to a <code>&lt;datalist&gt;</code> can still allow any value that is not listed in the <code>&lt;option&gt;</code> elements.</p>
<p>Here is a basic example:</p>
<iframe height="400" scrolling="no" title="Demo textual datalist on Codepen" src="https://codepen.io/twogrey/embed/preview/QwLEwvG?default-tab=result" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" sandbox="allow-scripts allow-same-origin"></iframe>
<p>Pretty cool, isn't it? But what happens if we combine <code>&lt;datalist&gt;</code> with less common field types, like <code>color</code> and <code>date</code>:</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>label</span> <span data-sanitized-class="token attr-name">for</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>favorite-color<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>What is your favorite color?<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>color<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">list</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>colors-list<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>favorite-color<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>datalist</span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>colors-list<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span>#FF0000<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span>#FFA500<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span>#FFFF00<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span>#008000<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span>#0000FF<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span>#800080<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span>#FFC0CB<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span>#FFFFFF<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span>#000000<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line"><span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>datalist</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<iframe height="400" scrolling="no" title="Demo color type field with datalist on Codepen" src="https://codepen.io/twogrey/embed/preview/YPKWPao?default-tab=result" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" sandbox="allow-scripts allow-same-origin"></iframe>
<p>Colors listed in <code>&lt;datalist&gt;</code> are pre-selectable but the color picker is still usable by users if they need to choose a more specific one.</p>
<pre data-sanitized-class="language-html"><code data-sanitized-class="language-html"><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>label</span> <span data-sanitized-class="token attr-name">for</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>event-choice<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">class</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>form-label col-form-label-lg<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>Choose a historical date<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>label</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>input</span> <span data-sanitized-class="token attr-name">type</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>date<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">list</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>events<span data-sanitized-class="token punctuation">"</span></span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>event-choice<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>datalist</span> <span data-sanitized-class="token attr-name">id</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>events<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>option</span> <span data-sanitized-class="token attr-name">label</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>Fall of the Berlin wall<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>1989-11-09<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>option</span> <span data-sanitized-class="token attr-name">label</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>Maastricht Treaty<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>1992-02-07<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">    <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;</span>option</span> <span data-sanitized-class="token attr-name">label</span><span data-sanitized-class="token attr-value"><span data-sanitized-class="token punctuation attr-equals">=</span><span data-sanitized-class="token punctuation">"</span>Brexit Referendum<span data-sanitized-class="token punctuation">"</span></span><span data-sanitized-class="token punctuation">&gt;</span></span>2016-06-23<span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>option</span><span data-sanitized-class="token punctuation">&gt;</span></span></span><br><span data-sanitized-class="highlight-line">  <span data-sanitized-class="token tag"><span data-sanitized-class="token tag"><span data-sanitized-class="token punctuation">&lt;/</span>datalist</span><span data-sanitized-class="token punctuation">&gt;</span></span></span></code></pre>
<iframe height="400" scrolling="no" title="Demo date type field with datalist on Codepen" src="https://codepen.io/twogrey/embed/preview/XJrKJyB?default-tab=result" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" sandbox="allow-scripts allow-same-origin"></iframe>
<p>Same here: some dates are pre-selectable and the datepicker is still available.</p>
<p>Depending on the context, having pre-defined values can possibly speed up the form filling by users.</p>
<p>Please, note that <code>&lt;datalist&gt;</code> should be seen as a <strong>progressive enhancement</strong> because of some points:</p>
<ul>
<li>For Firefox (tested on 133), the <code>&lt;datalist&gt;</code> element is compatible only with textual field types (think about text, url, tel, email, number). There is no support for color, date and time.</li>
<li>For Safari (tested on 15.6), it has support for color, but not for date and time.</li>
<li>With some screen reader/browser combinations there are issues. For example, <a href="https://a11ysupport.io/tests/tech__html__datalist/html__datalist_element/convey_role/vo_macos/safari">suggestions are not announced in Safari</a> and it's not possible to navigate to the datalist with the <code>down arrow</code> key (until you type something matched with suggestions). Refer to <a href="https://a11ysupport.io/tech/html/datalist_element">a11ysupport.io</a> for more.</li>
</ul>
<h2 data-sanitized-id="find-out-more">Find out more</h2>
<ul>
<li><a href="https://demo.agektmr.com/datalist/">datalist experiment</a> by <a href="https://bsky.app/profile/agektmr.com">Eiji Kitamura</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist">Documentation on MDN</a></li>
</ul>


guid: https://antonchaitkin.substack.com/p/war-and-betrayal-or-the-good-neighbor
title: War and Betrayal, or the Good Neighbor
author: ;Anton Chaitkin
link: https://antonchaitkin.substack.com/p/war-and-betrayal-or-the-good-neighbor
hash: iZ�X ��z���&�J
content:
<div><img src="https://substackcdn.com/image/fetch/w_1200,h_600,c_fill,f_jpg,q_auto:good,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6f8c069-0c6f-4451-a215-a67efc03352b_576x864.jpeg" data-sanitized-class="ff-og-image-inserted"></div><h3 data-sanitized-class="subtitle">Trump’s Supreme Test Will Come Quickly</h3><div dir="auto" data-sanitized-class="body markup">
<p>Trump’s Supreme Test Will Come Quickly:</p>
<h1 data-sanitized-class="header-anchor-post">War and Betrayal, or the Good Neighbor</h1>
<div data-sanitized-class="pencraft pc-display-flex pc-alignItems-center pc-position-absolute pc-reset header-anchor-parent">
<div data-sanitized-class="pencraft pc-display-contents pc-reset pubTheme-yiXxQA">
<div data-sanitized-id="§war-and-betrayal-or-the-good-neighbor" data-sanitized-class="pencraft pc-reset header-anchor offset-top">
<h1 data-sanitized-class="header-anchor-post"><button tabindex="0" type="button" data-href="https://antonchaitkin.substack.com/i/153782317/war-and-betrayal-or-the-good-neighbor" data-sanitized-class="pencraft pc-reset pencraft iconButton-mq_Et5 iconButtonBase-dJGHgN buttonBase-GK1x3M buttonStyle-r7yGCK size_sm-G3LciD priority_secondary-S63h9o"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></button></h1>
</div>
</div>
</div>
<p>By Anton Chaitkin; Copyright Anton Chaitkin</p>
<p>The recent US presidential election was a referendum in which voters rejected permanent war.</p>
<p>Americans share the choice of peace with the great majority of mankind.[1] This point of view is not left-wing or right-wing. People know that …</p>
</div>

attributes:
{"enclosures":[{"url":"https://substack-post-media.s3.amazonaws.com/public/images/e6f8c069-0c6f-4451-a215-a67efc03352b_576x864.jpeg","type":"image/jpeg"}]}


guid: https://christitus.com/enhanced-linux-in-windows/
title: Enhanced Linux in Windows
link: https://christitus.com/enhanced-linux-in-windows/
hash: �D��� o ���#X
attributes: {"enclosures":[]}
content:
<p>Using WSL is great for a lot of things, but often I find it limiting or quirky bugs that don’t happen on HyperV.</p>
<h2 data-sanitized-id="what-is-a-enhanced-hyperv-session-in-windows">What is a Enhanced HyperV Session in Windows?</h2>
<p>This allows full 3D acceleration, large resolutions, audio passthrough, and shared clipboard. There are many other things that this can do, but these are main benefits. I was using WSLg and constantly found little problems about moving around or compiling taking a long time and other issues.</p>
<p>The biggest problem with WSL is it isn’t Linux. It feels like a bolted on system that I have a hard time programming in.</p>
<p>Enter HyperV!</p>
<p>HyperV with Enhanced Session feels like Linux and it is FAST! I can go full screen and using it like a Linux desktop forgetting I am in Windows. The startup is only a few seconds and a fantastic alternative than doing a dual boot.</p>
<h2 data-sanitized-id="enabling-enhanced-session">Enabling Enhanced Session</h2>
<p>Arch Dependencies inside VM</p>
<div data-sanitized-class="highlight"><pre tabindex="0" data-sanitized-class="chroma"><code data-lang="fallback" data-sanitized-class="language-fallback"><span data-sanitized-class="line"><span data-sanitized-class="cl">yay -S xrdp xorgxrdp
</span></span></code></pre></div><p>Windows Configuration (PowerShell)</p>
<div data-sanitized-class="highlight"><pre tabindex="0" data-sanitized-class="chroma"><code data-lang="fallback" data-sanitized-class="language-fallback"><span data-sanitized-class="line"><span data-sanitized-class="cl">Set-VMhost -EnableEnhancedSessionMode $True
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">Set-VM -VMName "NameVM" -EnhancedSessionTransportType HvSocket
</span></span></code></pre></div><p>Configuration Script (install script)</p>
<div data-sanitized-class="highlight"><pre tabindex="0" data-sanitized-class="chroma"><code data-lang="bash" data-sanitized-class="language-bash"><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="cp">#!/bin/bash
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="cp"></span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1">#</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># This script is for Arch Linux to configure XRDP for enhanced session mode</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1">#</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># The configuration is adapted from the Ubuntu 16.04 script.</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1">#</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="k">if</span> <span data-sanitized-class="o">[</span> <span data-sanitized-class="s2">"</span><span data-sanitized-class="k">$(</span>id -u<span data-sanitized-class="k">)</span><span data-sanitized-class="s2">"</span> -ne <span data-sanitized-class="m">0</span> <span data-sanitized-class="o">]</span><span data-sanitized-class="p">;</span> <span data-sanitized-class="k">then</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"> <span data-sanitized-class="nb">echo</span> <span data-sanitized-class="s1">'This script must be run with root privileges'</span> &gt;<span data-sanitized-class="p">&amp;</span><span data-sanitized-class="m">2</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"> <span data-sanitized-class="nb">exit</span> <span data-sanitized-class="m">1</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="k">fi</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># Use Qi to check for exact package name</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="k">if</span> ! pacman -Qi xrdp &gt; /dev/null <span data-sanitized-class="p">;</span> <span data-sanitized-class="k">then</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"> <span data-sanitized-class="nb">echo</span> <span data-sanitized-class="s1">'xrdp not installed. Run makepkg.sh first to install xrdp.'</span> &gt;<span data-sanitized-class="p">&amp;</span><span data-sanitized-class="m">2</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"> <span data-sanitized-class="nb">exit</span> <span data-sanitized-class="m">1</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="k">fi</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># Use Qs to allow xorgxrdp-devel-git</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="k">if</span> ! pacman -Qs xorgxrdp &gt; /dev/null <span data-sanitized-class="p">;</span> <span data-sanitized-class="k">then</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"> <span data-sanitized-class="nb">echo</span> <span data-sanitized-class="s1">'xorgxrdp not installed. Run makepkg.sh first to install xorgxrdp.'</span> &gt;<span data-sanitized-class="p">&amp;</span><span data-sanitized-class="m">2</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"> <span data-sanitized-class="nb">exit</span> <span data-sanitized-class="m">1</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="k">fi</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1">###############################################################################</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># Configure XRDP</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1">#</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">systemctl <span data-sanitized-class="nb">enable</span> xrdp
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">systemctl <span data-sanitized-class="nb">enable</span> xrdp-sesman
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># Configure the installed XRDP ini files.</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># use vsock transport.</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">sed -i_orig -e <span data-sanitized-class="s1">'s/port=3389/port=vsock:\/\/-1:3389/g'</span> /etc/xrdp/xrdp.ini
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># use rdp security.</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">sed -i_orig -e <span data-sanitized-class="s1">'s/security_layer=negotiate/security_layer=rdp/g'</span> /etc/xrdp/xrdp.ini
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># remove encryption validation.</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">sed -i_orig -e <span data-sanitized-class="s1">'s/crypt_level=high/crypt_level=none/g'</span> /etc/xrdp/xrdp.ini
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># disable bitmap compression since its local its much faster</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">sed -i_orig -e <span data-sanitized-class="s1">'s/bitmap_compression=true/bitmap_compression=false/g'</span> /etc/xrdp/xrdp.ini
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1">#</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># sed -n -e 's/max_bpp=32/max_bpp=24/g' /etc/xrdp/xrdp.ini</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># use the default lightdm x display</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># sed -i_orig -e 's/X11DisplayOffset=10/X11DisplayOffset=0/g' /etc/xrdp/sesman.ini</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># rename the redirected drives to 'shared-drives'</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">sed -i_orig -e <span data-sanitized-class="s1">'s/FuseMountName=thinclient_drives/FuseMountName=shared-drives/g'</span> /etc/xrdp/sesman.ini
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># Change the allowed_users</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="nb">echo</span> <span data-sanitized-class="s2">"allowed_users=anybody"</span> &gt; /etc/X11/Xwrapper.config
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1">#Ensure hv_sock gets loaded</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="k">if</span> <span data-sanitized-class="o">[</span> ! -e /etc/modules-load.d/hv_sock.conf <span data-sanitized-class="o">]</span><span data-sanitized-class="p">;</span> <span data-sanitized-class="k">then</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"> <span data-sanitized-class="nb">echo</span> <span data-sanitized-class="s2">"hv_sock"</span> &gt; /etc/modules-load.d/hv_sock.conf
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="k">fi</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># Configure the policy xrdp session</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">cat &gt; /etc/polkit-1/rules.d/02-allow-colord.rules <span data-sanitized-class="s">&lt;&lt;EOF
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s">polkit.addRule(function(action, subject) {
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s"> if ((action.id == "org.freedesktop.color-manager.create-device" ||
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s"> action.id == "org.freedesktop.color-manager.modify-profile" ||
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s"> action.id == "org.freedesktop.color-manager.delete-device" ||
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s"> action.id == "org.freedesktop.color-manager.create-profile" ||
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s"> action.id == "org.freedesktop.color-manager.modify-profile" ||
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s"> action.id == "org.freedesktop.color-manager.delete-profile") &amp;&amp;
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s"> subject.isInGroup("users"))
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s"> {
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s"> return polkit.Result.YES;
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s"> }
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s">});
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s">EOF</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># Adapt the xrdp pam config</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">cat &gt; /etc/pam.d/xrdp-sesman <span data-sanitized-class="s">&lt;&lt;EOF
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s">#%PAM-1.0
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s">auth include system-remote-login
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s">account include system-remote-login
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s">password include system-remote-login
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s">session include system-remote-login
</span></span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="s">EOF</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl">
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1">###############################################################################</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1"># .xinitrc has to be modified manually.</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="c1">#</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="nb">echo</span> <span data-sanitized-class="s2">"You will have to configure .xinitrc to start your windows manager, see https://wiki.archlinux.org/index.php/Xinit"</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="nb">echo</span> <span data-sanitized-class="s2">"Reboot your machine to begin using XRDP."</span>
</span></span><span data-sanitized-class="line"><span data-sanitized-class="cl"><span data-sanitized-class="nb">echo</span> <span data-sanitized-class="s2">"Example: nano ~/.xinitrc"</span> and launch your desktop environment or window manager. Enter <span data-sanitized-class="s2">"exec dwm"</span> to launch dwm.
</span></span></code></pre></div><h2 data-sanitized-id="audio-issues">Audio Issues</h2>
<p>Depending on your audio setup you may run into issues. Currently, pulseaudio-module-xrdp is not working on the AUR for Arch. I have been unsuccessful in getting pipewire working with xrdp.</p>
<p>Check <a href="https://github.com/neutrinolabs/pulseaudio-module-xrdp">https://github.com/neutrinolabs/pulseaudio-module-xrdp</a> for more information.</p>
<p>Alternatively, you should be able to use pipewire with xrdp at <a href="https://github.com/neutrinolabs/pipewire-module-xrdp">https://github.com/neutrinolabs/pipewire-module-xrdp</a>. However, at the time of this writing it has not seen an update in 9 months. So this method will probably only work with fedora or debian based systems.</p>


guid: CCAL-118scal-2025-01-02
title: Senate Calendars, DAILY - Senate Calendars for January 2, 2025 - 118th Congress, 2nd Session
link: https://www.govinfo.gov/app/details/CCAL-118scal-2025-01-02
hash: `�q4)����ߍ�yl�
tags: #Proceedings of Congress and General Congressional Publications
attributes: {"enclosures":[]}
content:
<h2>Content Files</h2>
 <a href="https://www.govinfo.gov/content/pkg/CCAL-118scal-2025-01-02/pdf/CCAL-118scal-2025-01-02.pdf">PDF</a><br>
 
 
 
 
 <h2>Metadata download</h2>
 <a href="https://www.govinfo.gov/metadata/pkg/CCAL-118scal-2025-01-02/mods.xml">Descriptive Metadata (MODS)</a><br>
 <a href="https://www.govinfo.gov/metadata/pkg/CCAL-118scal-2025-01-02/premis.xml">Preservation Metadata (PREMIS)</a><br>
 <h2>All Content and Metadata files, including granules</h2> <a href="https://www.govinfo.gov/content/pkg/CCAL-118scal-2025-01-02.zip">ZIP</a>


title: Mel K &amp; Cynthia Chung | Operation Phoenix Revisited | 12-10-24
author: ;Canadian Patriot Press
hash: �^��_Hc�Mm�:a�+
guid:
https://odysee.com/Mel-K---Cynthia-Chung-_-Operation-Phoenix-Revisited-_-12-10-24:6456a9c3bd6f370d77050c0f774ea154e7b6a9ac

content:
<p><img src="https://thumbs.odycdn.com/f6f31d1600ac0b09618ffbe7e0ff0805.webp" width="480" alt="thumbnail" title="Mel K &amp; Cynthia Chung | Operation Phoenix Revisited | 12-10-24"></p>December 10, 2024<br><br>**********************************************<br>You can find Mel K’s work at:        <br>Website: https://themelkshow.com<br>Rumble: https://rumble.com/c/TheMelKShow<br>Twitter: https://twitter.com/MelKShow<br><br>**********************************************<br>Get Science Unshackled here<br>https://matthewehret.substack.com/p/my-new-book-has-now-hit-the-press<br><br>Cynthia &amp; Matt's books:<br>https://canadianpatriot.org/untold-history-of-canada-books/<br><br>Watch the Docu-series “Escaping Calypso’s Island” here:<br><br>Watch the Canadian Patriot Film “Like a Phoenix: The Death and Rebirth of America” here:<br>https://www.youtube.com/watch?v=U3EamfkiBTc&amp;t=5s<br><br>Watch the Docu-series “The Hidden Hand Behind UFOs” here:<br>https://canadianpatriot.org/2023/11/01/the-hidden-hand-behind-ufos-episode-1-lifting-the-esoteric-veil/<br><br>Support the Canadian Patriot Review in the following ways:<br><br>1) Make a donation to the Canadian Patriot<br>https://www.patreon.com/canadianpatriot<br>https://canadianpatriot.org/support-us/<br><br>2) Subscribe to Matt and Cynthia's Substack<br>https://matthewehret.substack.com/<br>https://cynthiachung.substack.com/<br><br>3) Buy some books!<br>https://canadianpatriot.org/untold-history-of-canada-books/<br><br><br>4) Subscribe to our Telegram Channels<br>https://t.me/CanadianPatriotPress<br><br><br><br>Since it is likely just a matter of time before this Youtube channel (https://www.youtube.com/@canadianpatriotpress3573) gets suspended again or taken down entirely, check out our alternative platforms:<br><br>On Rumble<br>https://rumble.com/user/MattEhret<br><br><br>On Bitchute:<br>https://www.bitchute.com/channel/FPD8fbk6o541/<br><br><br>On Soundcloud:<br>https://soundcloud.com/mattehret<br>

link:
https://odysee.com/Mel-K---Cynthia-Chung-_-Operation-Phoenix-Revisited-_-12-10-24:6456a9c3bd6f370d77050c0f774ea154e7b6a9ac

attributes:
{"enclosures":[{"url":"https://player.odycdn.com/api/v3/streams/free/Mel-K---Cynthia-Chung-_-Operation-Phoenix-Revisited-_-12-10-24/6456a9c3bd6f370d77050c0f774ea154e7b6a9ac/f73228.mp4","type":"video/mp4","length":4241862541}]}


guid: https://alexkrainer.substack.com/p/the-fall-of-britain-part-2
title: The fall of Britain (part 2)
author: ;Alex Krainer
link: https://alexkrainer.substack.com/p/the-fall-of-britain-part-2
hash: qn��<~�q�����
content:
<p>The sequence of  events that took place during the last few months of this year, including the presidential elections in the United States and the war in Syria overshadowed important developments in the news cycle, especially on the economic front. One of them is the approaching collapse of Great Britain. </p><p>I believe that we are close to the precipice of events that will remain recorded in history, perhaps like the 1921 Weimar republic hyperinflation, 1929 stock market crash, or the collapse of the Soviet Union in 1991. The events will cause a lot of pain for great many people, but if we correctly anticipate them and prepare for the coming changes, at the very least we should be able to weather the storm intact.</p><p>About three months ago, on 26 August I published an article titled “<a href="https://alexkrainer.substack.com/p/the-coming-collapse-of-britain">The coming collapse of Britain</a>.” If you missed it, give it a scan as it sets the backdrop to this report. During this year’s summer months, British ruling establishment appeared to be in a panic over Ukraine’s imminent military defeat and her debt default. Britain has invested quite massively in project Ukraine, which now looks like a failed investment. </p><p>Indeed, on 27 August, only one day after I published that article, Prime Minister <strong>Keir</strong> <strong>Starmer</strong> gave a <a href="https://x.com/Keir_Starmer/status/1828356735436013697">speech in the Downing Street garden</a>, in which he disclosed that there was a “£22 billion black hole in the public finances.” Supposedly, his government only discovered this once they came to power. By “black hole,” Starmer was referring to the government’s unfunded liabilities.</p><h2>Catastrophic fiscal conditions</h2><p>To prepare the nation for more bad news, the Prime Minister announced that the October 30 budget would be “painful.” Well, October 30 is behind us and now we know. When the news broke, Deutsche Bank’s analyst <strong>Sanjay Raja</strong> characterized the budget as, “one of the largest fiscal loosening of any fiscal event in decades.” In the post-war years it was only surpassed in 2020 due to the Covid 19 lockdowns. </p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4404eb03-4b35-4860-bea3-42fb56ff6186_574x367.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4404eb03-4b35-4860-bea3-42fb56ff6186_574x367.png" width="574" height="367" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/4404eb03-4b35-4860-bea3-42fb56ff6186_574x367.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":367,"width":574,"resizeWidth":null,"bytes":93351,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":false,"topImage":true,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" fetchpriority="high" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><p>The new budget adds £142 billion in new debt, which the government expects to raise in capital markets. But the sheer amount of the planned borrowing took the markets by surprise. As it turns out, Britain’s gross financing needs are double what market analysts had expected.</p><p>The painful side to the budget which Mr. Starmer promised will come not only in terms of savage austerity imposed on society’s most vulnerable groups but also in terms of £40 billion in new taxes. The burden of these new taxes will fall largely on British employers, which will in turn hurt the working people. Ultimately, it will also hurt the government. In suffocating the economy, the government will only widen the gap between public spending and its tax receipts. Britain is already running one of the world’s largest budget deficits. Bloomberg’s analyst <strong>Simon White</strong> had a point when he judged the fiscal picture in Britain as catastrophic.</p><h2>Lipstick on a pig</h2><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F269a3098-e950-4f3a-aff1-05664394bd8a_771x332.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F269a3098-e950-4f3a-aff1-05664394bd8a_771x332.png" width="771" height="332" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/269a3098-e950-4f3a-aff1-05664394bd8a_771x332.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":332,"width":771,"resizeWidth":null,"bytes":137684,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a><figcaption data-sanitized-class="image-caption">OBR: Office of Budget Responsibility and airbrushing Britain’s finances.</figcaption></figure></div><p>UK’s Office of Budget Responsibility (OBR) applied lipstick on the proverbial pig with some suspiciously rosy-looking forecasts. They projected that the government’s budget deficits will stay at around 2.5% through 2029. Inflation will stay perfectly under control, peaking at 2.6% in 2025 and then gradually fall back to 2% by 2029. The OBR also revised Britain’s 2024 GDP growth rate to 1.1%, up from 0.8% in March. In 2025, the GDP growth will soar to 2%.</p><h2>Reality begs to differ</h2><p>But the government might be a bit optimistic with all these figures. The Organization for Economic Cooperation and Development (OECD) recently downgraded Britain’s economic prospects. They predicted that in 2024, the UK will have the worst performing economy among all the G7 nations with an expected growth of only 0.4%, not 1.1%; and 1% in 2025, not 2%.</p><p>But as it now turns out, even the OECD was much too optimistic. Namely, the official figures show that the British economy actually shrank 0.1% month-on-month for two months in a row, in September and October 2024</p><h2>Bold financial innovation</h2><p>But there’s more: to show itself in its best light, the government even resorted to bold financial innovation. Namely, they disappeared a large chunk of the public debt <a href="https://www.zerohedge.com/economics/uk-change-definition-debt-so-it-can-add-90-billion-more">by simply redefining it</a>.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6a08afc-2362-403c-ba52-60144a64194d_591x309.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6a08afc-2362-403c-ba52-60144a64194d_591x309.png" width="591" height="309" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/f6a08afc-2362-403c-ba52-60144a64194d_591x309.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":309,"width":591,"resizeWidth":null,"bytes":236473,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><p>In doing so, Keir Starmer’s cabinet gave itself £53 billion in extra borrowing capacity. If the capital markets embraced this bold 21st century financial innovation, all governments, companies and individuals around the world might want to follow suit.</p><p>If you've maxed out all your credit cards, additional borrowing headroom could be just a simple matter of identity politics. You could declare your debt an asset and perfectly good collateral at that, and progressive creditors should have to respect and honor your choices. The 21st century may not have brought us flying cars, but the financial innovations are just as exciting. Who knows, perhaps we could achieve further advancements by declaring that war is peace, slavery is freedom, vaccines are safe and effective, and that ignorance is strength.</p><p>Unfortunately for the government, however, all these innovations failed to impress Mr. Market who punished Starmer’s profligate budget within hours by selling off the government debt and adding 20 basis points to the interest rate on the 10-year British gilts.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8c94e92-ca5d-4df8-aeed-2dc8f6b30b87_712x374.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8c94e92-ca5d-4df8-aeed-2dc8f6b30b87_712x374.png" width="712" height="374" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/e8c94e92-ca5d-4df8-aeed-2dc8f6b30b87_712x374.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":374,"width":712,"resizeWidth":null,"bytes":198289,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><h2>The good old days of 2022</h2><p>But this reaction was quite minor compared to what happened in September 2022 when Chancellor <strong>Qwasi Qwarteng</strong> presented the <strong>Truss</strong> cabinet budget. The so-called mini-budget shocked the markets with £45 billion in unfunded spending commitments. There’s “only” £32 billion in unfunded commitments in the current budget, but there are a few reasons why the situation today could be much worse than what Britain was facing in 2022. </p><p>Back then, Britain was not yet as heavily invested in the wars in Ukraine and in Israel. In 2022, many people believed that Ukraine would prevail. This is no longer the case today. Also, in the summer of 2022, the interest rates on 10-year gilts were well below 3%. Today they’re over 4.5% and rising. In fact, the sharp rise in interest rates since 2022 itself indicates that the situation could be worse than we know.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf5cc833-b2e5-4cac-a2e5-6f55a891aae1_693x395.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdf5cc833-b2e5-4cac-a2e5-6f55a891aae1_693x395.png" width="693" height="395" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/df5cc833-b2e5-4cac-a2e5-6f55a891aae1_693x395.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":395,"width":693,"resizeWidth":null,"bytes":157806,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><p>The most important indication that something was very wrong was the fact that the Bank of England (BOE) felt obliged to open the monetary spigots wide. Recall, on 22 July they hastily <a href="https://www.cmdportal.com/events/the-future-boe-balance-sheet-a-new-system-for-supplying-reserves/">introduced a repo program</a>, announced as a bold “transition towards a new system for supplying reserves” to financial institutions. This move was clear evidence that one or more of British financial institutions were about to collapse. </p><p>By September 5, the program already <a href="https://www.reuters.com/markets/rates-bonds/bank-england-allots-record-40-billion-pounds-weekly-repo-2024-09-05/">ballooned to over £40 billion</a>. We’ll take a small detour to talk about repos here because it’s important to explain what repos are and why BOE’s launching a repo program is significant. If you feel you know enough about repos, feel free to skip to the next heading.</p><h2>The repo red flag</h2><p>Repos or repurchase agreements are an important source of funding for large financial institutions. A repo is a form of borrowing where the borrower sells securities to the lender with an agreement to repurchase them at a slightly higher price. Simply, it’s a form of secured loan. In the first step of the transaction, the lender buys some financial assets from the borrower. </p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd20c1cf6-a2b3-4904-91fd-dac6e2ffcecd_775x439.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd20c1cf6-a2b3-4904-91fd-dac6e2ffcecd_775x439.png" width="775" height="439" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/d20c1cf6-a2b3-4904-91fd-dac6e2ffcecd_775x439.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":439,"width":775,"resizeWidth":null,"bytes":24229,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><p>The assets also represent the collateral which secures the loan. Normally, the collateral in question would be highly liquid, low-risk securities like government bonds, but they could also be mortgage-backed securities. In the second step, the borrower repurchases the securities at a higher price. The difference between the sale and the repurchase price reflects the interest on the loan that’s due to the lender. The lender might also demand that the loan be overcollateralized: that the value of the collateral exceeds the purchase amount by some percentage.</p><p>Repos are usually very short-term transactions, most often overnight, but they can also be arranged for longer time intervals spanning several days or several weeks. They can also be open ended, with no term specified. As a rule, in repo transactions the lenders are private, non-depositary financial institutions or money market funds. For them, repo transactions are a lucrative source of investment returns as they earn reliable interest income in transactions that are almost risk-free. The borrowers are usually investment banks for whom the repo market is a critically important source of liquidity.</p><p>In the U.S. over a $1 trillion in repo transactions are conducted each day. During financial crises, however, the repo market is one of the first to seize up. If a borrower is unable to repurchase the securities they sold, the lender might remain stuck with the collateral. In a crisis, the value of that collateral could collapse. In such conditions, the lenders might demand higher interest rates and higher rates of recollateralization. They might even be unwilling to engage in repo transactions at all. </p><p>In 2007, the Global Financial Crisis was catalyzed by a run on the repo market: the funding for investment banks became either prohibitively expensive or entirely unavailable. At that time the Fed did not enter the repo markets, but Ben Bernanke injected at least $1.5 trillion of liquidity by purchasing financial assets through other, longer-term facilities.</p><p>In 2019, yet another financial crisis was about to hit the proverbial fan. In August 2019, the President of the Federal Reserve Bank of St. Louis, <strong><a href="https://www.ft.com/content/360028ba-c702-11e9-af46-b09e8bfe60c0">James Bullard</a></strong><a href="https://www.ft.com/content/360028ba-c702-11e9-af46-b09e8bfe60c0"> said that</a>, “Something is going on, and that’s causing, I think, a total rethink of central banking and all our cherished notions about what we think we’re doing… We just have to stop thinking that next year things are going to be normal.” Well, as we now know, within a few months we got the New Normal!</p><p>The repo rates in the U.S. have been rising steadily since 2015, but by 2019 that trend began to accelerate quite sharply. On 16 September, repo rates exploded to 8%, fully 6% above the Fed Funds rate.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6346f6fd-19d5-4130-99e7-445eb5f95f51_713x354.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6346f6fd-19d5-4130-99e7-445eb5f95f51_713x354.png" width="713" height="354" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/6346f6fd-19d5-4130-99e7-445eb5f95f51_713x354.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":354,"width":713,"resizeWidth":null,"bytes":104461,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><p>To avert another, much bigger Lehman Brothers moment, the Fed hastily intervened as the lender of last resort, providing tens of billions of dollars in liquidity to the repo markets. The intervention was supposed to be only temporary. The Fed’s repo facility was meant to be shut down by 10 October 2019. Except it wasn’t: instead, it continued to expand from the initial $53 billion to surpass $200 billion by the end of October.</p><p>We don’t know the full story however, because like the British authorities today, the Fed kept things very obscure. Writing about the episode in January 2022, Fed Watchers <strong><a href="https://wallstreetonparade.com/2022/01/theres-a-news-blackout-on-the-feds-naming-of-the-banks-that-got-its-emergency-repo-loans-some-journalists-appear-to-be-under-gag-orders/">Pam</a></strong><a href="https://wallstreetonparade.com/2022/01/theres-a-news-blackout-on-the-feds-naming-of-the-banks-that-got-its-emergency-repo-loans-some-journalists-appear-to-be-under-gag-orders/"> and </a><strong><a href="https://wallstreetonparade.com/2022/01/theres-a-news-blackout-on-the-feds-naming-of-the-banks-that-got-its-emergency-repo-loans-some-journalists-appear-to-be-under-gag-orders/">Russ Martens</a></strong><a href="https://wallstreetonparade.com/2022/01/theres-a-news-blackout-on-the-feds-naming-of-the-banks-that-got-its-emergency-repo-loans-some-journalists-appear-to-be-under-gag-orders/"> wrote that</a>, “We’ve never before seen a total news blackout of a financial news story of this magnitude in our 35 years of monitoring Wall Street and the Fed.” The Fed never had disclosed which banks got how much repo cash<a href="https://alexkrainer.substack.com/p/the-fall-of-britain-part-2#_ftn1">[1]</a>. The reason for all the secrecy was that the problem was much bigger than we were told and it wasn’t limited to the United States.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc441f66e-4807-4751-bb8a-1dd2756153f8_771x435.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc441f66e-4807-4751-bb8a-1dd2756153f8_771x435.png" width="771" height="435" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/c441f66e-4807-4751-bb8a-1dd2756153f8_771x435.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":435,"width":771,"resizeWidth":null,"bytes":141293,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><p>On Saturday, 19 October 2019 the World Bank Group and the International Monetary Fund held a meeting in New York. On the occasion, UN Secretary-General <strong><a href="https://news.un.org/en/story/2019/10/1049631">António Guterres</a></strong><a href="https://news.un.org/en/story/2019/10/1049631"> spoke</a> and underscored that the world economy was in “tense and testing times,” and facing severe headwinds. He pleaded with the overlords of global finance to “do everything possible” to avert the “the possibility of a Great Fracture” in the world. By January 2020, we had numerous reports about interbank lending and commercial credit drying up in Europe, with banks issuing margin calls and cutting credit lines. It appeared that a massive financial crisis was imminent.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe51943a6-5873-4c03-89ef-e49bfbe63aee_1440x1100.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe51943a6-5873-4c03-89ef-e49bfbe63aee_1440x1100.png" width="1440" height="1100" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/e51943a6-5873-4c03-89ef-e49bfbe63aee_1440x1100.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":1100,"width":1440,"resizeWidth":null,"bytes":289992,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><h2>But just then, a miracle happened!</h2><p>But just then a fortuitous event almost miraculously rescued the banking system. The World Health Organization declared the Covid 19 pandemic, creating the perfect smokescreen for the bankers to stage a veritable global banking coup followed by the largest ever bailout of the entire Western financial system. </p><p>In the U.S. the CARES Act was passed, providing a $6.2 trillion ‘stimulus’ package for the economy. How much is $6.2 trillion? It is nearly $20,000 per man, woman and child living in the United States. Not only that, US lawmakers somehow had the foresight to introduce this Act into the Congressional procedure already in January 2019, more than a year before the pandemic was declared.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b15b779-4d79-4abc-a12c-2fcdeea24222_667x360.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b15b779-4d79-4abc-a12c-2fcdeea24222_667x360.png" width="667" height="360" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/8b15b779-4d79-4abc-a12c-2fcdeea24222_667x360.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":360,"width":667,"resizeWidth":null,"bytes":90531,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a><figcaption data-sanitized-class="image-caption">Amazing foresight!</figcaption></figure></div><p>Ultimately, the total bailout gifted to the bankers exceeded 10 trillion dollars – well more than $30,000 per man, woman and child living in the United States.</p><p>That sum clearly dwarfed the Fed’s repo facility, but the repos were essential in averting the collapse in September 2019. Thanks to their opacity and complexity, repos saved the day as a sort of a Swiss Army knife in the bankers' survival toolkit. For example, they can serve as a means of perpetual bailout: among others, Lehman Brothers systematically used repo transactions to conceal their investment losses and create for a time a false impression of liquidity. For central banks, repos can be a covert mechanism of monetary policy. The Reserve Bank of India routinely uses repos and reverse repos to increase or decrease money supply in the economy.</p><p>Today, it seems that we are at the precipice once more. Keir Starmer’s budget represents the largest fiscal loosening since the 2020 lockdowns and the Bank of England is flooding the financial system with liquidity. It is fair to ask then, how bad could things be in the UK?</p><h2>The black hole: £71 or £22 billion?</h2><p>I don’t really know the answer to that question. As a market analyst and a former hedge fund manager, I regularly read the financial press, and I’ve done so for over 25 years. But over that time, I couldn’t help noticing that UK’s public finances aren’t subject to the same level of scrutiny as those of other nations. We hear a lot about the US, Japan, Germany, France, or China. About Britain, not so much.</p><p>What we can find from public sources isn’t exactly sensational. We already know that UK’s government debt is high and rising; in 2023 it was <a href="https://www.reuters.com/world/uk/uk-budget-deficit-totals-143-billion-pounds-nov-ons-2023-12-21/">nearly £116 billion</a>, 27% more than the year before. <a href="https://www.ons.gov.uk/economy/governmentpublicsectorandtaxes/publicsectorfinance/bulletins/publicsectorfinances/august2024">UK’s Office of National Statistics says that</a> the government added £64.1 billion in deficit spending through August this year and that debt-to-GDP ratio reached 100%.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F937d72a9-ba54-4c70-a121-2af1ed60e029_624x238.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F937d72a9-ba54-4c70-a121-2af1ed60e029_624x238.png" width="624" height="238" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/937d72a9-ba54-4c70-a121-2af1ed60e029_624x238.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":238,"width":624,"resizeWidth":null,"bytes":54835,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div></div></div></a></figure></div><p>The figures are bad, but they’re hardly panic-inducing stuff. I suspect that the real state of things is much worse and that it is being deliberately concealed.</p><p>There are times however, when some truth breaks into the public view through political squabbles. For example, on May 1 this year, Kier Starmer confronted then Prime Minister <strong>Rishi Sunak</strong> about the £46 billion black hole <a href="https://www.bbc.com/news/articles/c3g51qlxezro?xtor=AL-72-%5Bpartner%5D-%5Byahoo.north.america%5D-%5Bheadline%5D-%5Bnews%5D-%5Bbizdev%5D-%5Bisapi%5D&amp;ysclid=m13gebdoal816345505">before correcting himself</a>, first to £64 billion and then to staggering £71 billion! Whatever the case, the “black hole” is there and it is probably much bigger than we know. Of course, by the time Starmer became Prime Minister, the hole had magically shrunk to ‘only’ £22 billion – the sum that’s perhaps small enough that it can be fixed in part by freezing a few thousand pensioners this winter.</p><h2>The system that demands human sacrifice</h2><p>Incidentally: what is this financial system that requires a limitless flow of free money to gorge the gods of finance while at the same time it inflicts savage austerity on the poorest and most vulnerable members of society, condemning many of them literally to death. Whatever the Gods of finance are, they clearly demand human sacrifice. Our liberal democracies fear these gods enough that they are prepared to appease them at an industrial scale.</p><p>To save about £1.4 billion, <strong>Sir Keir Starmer</strong> has decided to cut winter fuel subsidies to 10 million pensioners in Britain. Back in 2017 Tory Prime Minister <strong>Theresa May</strong> floated a similar proposal. At the time, Labour was in opposition and their own research concluded that cutting winter fuel allowances would kill an estimated <a href="https://www.express.co.uk/news/politics/1946329/Labour-pensioners-dead-winter-fuel-thousands">3,850 pensioners that winter</a>. That was five years before "<a href="https://commonslibrary.parliament.uk/research-briefings/cbp-9491/">typical household energy bills increased by 54% in April 2022 and 27% in October that year</a>.</p><p>Britain now has the highest cost of energy in the world and the required human sacrifice could turn out considerably higher than 3,850 pensioners, all to save a relatively insignificant sum of money: a mere £1.4 billion of the supposed £22 billion fiscal black hole.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdd48ba9-dfdc-47bd-93ae-ad0e5918f2d4_472x561.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdd48ba9-dfdc-47bd-93ae-ad0e5918f2d4_472x561.png" width="472" height="561" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/bdd48ba9-dfdc-47bd-93ae-ad0e5918f2d4_472x561.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":561,"width":472,"resizeWidth":null,"bytes":145441,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><h2>What they’re lying about…</h2><p>To be sure, Starmer was almost certainly lying about the size of that black hole. Massive government spending on unproductive, ideologically driven pet projects had created a <a href="https://www.telegraph.co.uk/politics/2022/11/04/pensions-stealth-tax-raid-hit-millions-savers/">£50 billion black hole</a> already in 2022. The cost of Covid counter measures was £9 billion. Government’s Orwellian <a href="https://fullfact.org/online/track-and-trace-project-cost/">track and trace program cost £37 billion</a>. In addition, vast sums are being spent on various <em>net zero</em> schemes. </p><p>Just <a href="https://lordslibrary.parliament.uk/uk-contribution-to-international-development-mitigating-the-impact-of-climate-change-on-developing-nations/">in 2022 the government spent £12.79 billion</a> on “mitigating the impact of climate change,” whatever that is. Furthermore, at the beginning of October 2024 they announced <a href="https://www.bbc.com/news/articles/cy4301n3771o">they'd allocate another £22 billion for carbon capture projects</a>, building facilities to capture carbon from the atmosphere and store it underground. To be fair, the said amounts will be spent over a period of 25 years, but still, this is just more and more billions wasted on completely unproductive projects, far into the future. Starmer’s government also added £2.9 billion to Britain’s “defence” budget, a 4.5% increase over previous year’s budget and more than twice as much as they’re saving by freezing the pensioners.</p><h2>The illegal immigration black hole</h2><p>Then there’s immigration: supposedly, the upkeep of illegal <a href="https://www.zerohedge.com/political/16-million-migrants-uk-are-unemployed-costing-taxpayers-ps85-billion-report">migrants costs the government £8.5 billion per year</a>. But the actual cost is almost certainly much, much higher. Back in 2009, we were told that the <a href="https://centurean2.wordpress.com/2009/06/02/12-8-billion-a-year-cost-of-immigration-in-britain-poliliars-incapable-of-telling-the-truth/">cost of immigration was £12.8 billion</a> per year; in 2016 they said <a href="https://www.dailymail.co.uk/news/article-3593872/17bn-true-cost-immigration-UK-year.html">it was £17 billion</a>, and since then the number of migrants increased by more than 2 million, so the cost of their upkeep would not have halved since 2016. Most likely it would have increased and dramatically so.</p><p>Then there’s the all-consuming Project Ukraine. From February 2022 until now, Britain allegedly spent more than £13 billion in aid to Ukraine. But the real damage from this misadventure cost many times more. Sanctions against Russia have caused extensive damage to Britain’s economy, starting with a sharp increase in prices of energy and other inputs. Farmers reported that the cost of fertilizer has quadrupled, from £250/ton before the sanctions to £1,000/ton today. Many British companies lost business on account of sanctions.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F595922c2-213b-4af9-81df-698ea698c4e3_509x512.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F595922c2-213b-4af9-81df-698ea698c4e3_509x512.png" width="509" height="512" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/595922c2-213b-4af9-81df-698ea698c4e3_509x512.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":512,"width":509,"resizeWidth":null,"bytes":241470,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><p>Just one example was <a href="https://www.theguardian.com/business/article/2024/aug/08/ba-to-axe-direct-flights-from-london-heathrow-to-beijing">British Airways' cancellation of one of its most important routes</a>: the 4-times weekly direct flight from London Heathrow to Beijing. In a retaliatory measure against British sanctions, Russia closed its airspace to British commercial flights, rendering it uncompetitive and simply surrendering the business to BA’s Chinese competitors. There are probably thousands of similar cases where business relationships that may have taken years and decades to develop have been blown up over the ruling establishment’s geopolitical obsessions.</p><h2>Russia sanctions - the staggering collateral damage</h2><p>It would be difficult to quantify all the effects, but in June 2023, European High Representative for Foreign Affairs <strong><a href="https://www.eeas.europa.eu/eeas/singapore-speech-hrvp-borrell-shangri-la-dialogue_en">Josep Borrell</a></strong><a href="https://www.eeas.europa.eu/eeas/singapore-speech-hrvp-borrell-shangri-la-dialogue_en"> gave us an important clue</a>. Here’s what he said in his remarks to the Shangri La Dialogue forum in Singapore:</p><blockquote><p>“For the first time ever, we have been funding military support to a country under attack. … if you add up all the support – military, civilian, economic, financial and humanitarian – the level of support to Ukraine is about €60 billion for Europe. But let me show another figure which is really impressive: if you include the support that the European governments have had to pay in order to help their families and firms to face the high prices of electricity, of food, the subsidies to our people in order to face the consequences of the war is €700 billion – ten times more than the support for Ukraine. Which shows that the consequences of this war are not reduced to what’s happening in Ukraine but to the shockwaves that the war has been sending all around the world.”</p></blockquote><p>If the shockwaves Borrell was talking about hit Britain as hard as they hit the EU nations, the full cost of Project Ukraine could be £150 billion or even more. Keep in mind, Borrell made his assessment only half way through the Ukraine war. However high the real damage is, all that capital has already been flushed down the drain and will likely never be recovered.</p><p>In all, the situation in Britain is certainly far worse than we know. Over the top, Orwellian actions by the Starmer government and the Bank of England seem to support this view. What we have, in a nutshell, is an overhang of unpayable debts, growing government deficits, hard austerity, increasing militarization, continued foreign adventurism, not only in Russia but also in the Middle East, and an expanding monetary inflation by the Bank of England.</p><h2>The markets verdict</h2><p>Since my August article, I wondered if I wasn’t wrong to single out the UK as the most exposed economy and the one that’ll crash the hardest. I checked the capital markets’ verdict on the situation by comparing the recent performance of British, German and American bonds. Sure enough, so far the markets appear to agree:</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f3e80a5-dfcd-4d33-ab8e-5241d1d56ad9_1058x520.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f3e80a5-dfcd-4d33-ab8e-5241d1d56ad9_1058x520.png" width="1058" height="520" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/8f3e80a5-dfcd-4d33-ab8e-5241d1d56ad9_1058x520.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":520,"width":1058,"resizeWidth":null,"bytes":90932,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a><figcaption data-sanitized-class="image-caption">Major geopolitical turning points seem to have accelerated the “bonds armageddon”</figcaption></figure></div><p>Over the last four years, British government’s debt has performed the worst of three. Germany’s debt has done marginally better and the US debt, as could be expected, has been the least affected. Over the coming months and years, Britain might be the first among the G7 economies to capsize and plunge into a deep crisis of stagflation and ultimately hyperinflation.</p><p>If that is so, how can we navigate the coming changes advantageously? Making a broad brush prediction is one thing – navigating it successfully is far less straightforward and it requires some foresight, skill, and a method.</p><div data-attrs='{"url":"https://alexkrainer.substack.com/p/the-fall-of-britain-part-2?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share","text":"Share"}' data-component-name="CaptionedButtonToDOM" data-sanitized-class="captioned-button-wrap"><div data-sanitized-class="preamble"><p data-sanitized-class="cta-caption">Thanks for reading! Nothing on this Substack is behind a paywall, so feel free to share it.</p></div><p data-attrs='{"url":"https://alexkrainer.substack.com/p/the-fall-of-britain-part-2?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share","text":"Share"}' data-component-name="ButtonCreateButton" data-sanitized-class="button-wrapper"><a href="https://alexkrainer.substack.com/p/the-fall-of-britain-part-2?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share" data-sanitized-class="button primary"><span>Share</span></a></p></div><h2>What happens next?</h2><p>The unravelling of this crisis will be for history books. Former Fed chairman <strong>Arthur Burns</strong> said that “A subtle understanding of economic change comes from a knowledge of history and large affairs, not from statistics or their processing alone.” Indeed, it was just this understanding of history and large affairs that’s led me to make a prediction about Britain’s descent already three years ago. In <a href="https://isystem-tf.com/2021/10/27/the-fall-of-global-britain-an-investment-hypothesis/">an article I published on 11 October 2021</a> I wrote as follows:</p><blockquote><p>“The UK will likely make all the mistakes made by other powers in that similar position through history: it will suffocate its domestic economic growth by imposing hard austerity at home while at the same time increasing military spending and foreign adventurism. Britain’s public debt will continue to outpace its GDP growth and the government’s budget deficits will be covered by Bank of England’s monetary inflation. This recipe reliably leads to stagflation and possibly to hyperinflation.”</p></blockquote><p>This is exactly what started to unfold over the last three years. For the record, I wrote the above before the war in Ukraine even started, adding tens of billions to the debt overhang. It was before <strong>Boris Johnson</strong> preannounced the war in his cryptic speech on Monday, 15 November of that year (2021). <a href="https://www.independent.co.uk/news/uk/politics/boris-johnson-russia-gas-nordstream-2-b1958075.html">Addressing the attending dignitaries</a> at the City of London banquet, then Prime Minister <strong>Johnson</strong><em><strong> </strong></em>issued a warning to the European governments:</p><blockquote><p>“We hope that our friends [in Europe] may recognize that a choice is shortly coming between mainlining ever more Russian hydrocarbons in giant new pipelines and sticking up for Ukraine and championing the cause of peace and stability.”</p></blockquote><p>How Johnson knew that this choice was shortly coming remains a mystery, but the fact that he did know it and that he included that announcement in his remarks was very significant. </p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F062a8263-6942-4836-8eca-2c4932d1ed33_934x478.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F062a8263-6942-4836-8eca-2c4932d1ed33_934x478.png" width="934" height="478" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/062a8263-6942-4836-8eca-2c4932d1ed33_934x478.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":478,"width":934,"resizeWidth":null,"bytes":999118,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a><figcaption data-sanitized-class="image-caption">It’s not so much <em>what</em> you know - it’s <em>whom</em> you know.</figcaption></figure></div><p>The statement was a big reveal: it suggested that Britain took the leading role in Project Ukraine and gambled heavily on it. That gamble went badly wrong and the bills are now coming due. That is what induced the panic in the British establishment’s ranks. Incidentally, Johnson’s statement is also the lead to the main suspects in Europe’s escalating energy wars.</p><p>Project Ukraine accelerated Britain’s decline, but that decline has already been long in the making. In my 2021 article, which was titled, “The fall of Global Britain: an investment hypothesis,” I made the following specific prediction: </p><blockquote><p>“… at a macro level, we can expect the following developments over the coming months and years: asset prices will probably continue to rise (i.e. a bullish cycle for the FTSE 100), but the government bonds will continue to slide along with the British pound.” </p></blockquote><p>Here’s how these predictions panned out thus far:</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc50af424-07f4-4dc6-b6f7-9cfd80e75cd8_1083x482.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc50af424-07f4-4dc6-b6f7-9cfd80e75cd8_1083x482.png" width="1083" height="482" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/c50af424-07f4-4dc6-b6f7-9cfd80e75cd8_1083x482.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":482,"width":1083,"resizeWidth":null,"bytes":81649,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a><figcaption data-sanitized-class="image-caption">Correct prediction, but bumpy trajectory</figcaption></figure></div><p>Broadly, my prediction was correct, but the price changes didn’t exactly follow straight line trajectories. This is normal; markets don’t do what we think they should do from the moment we become aware of some fact. They are driven by the collective psychology of their human participants and large-scale price events only begin to unfold when a critical mass of them adopt a certain view. This is why large scale price events are unpredictable and the challenge of navigating them profitably is not trivial. One thing we do know for sure is that large-scale price events unfold as trends that can span weeks, months or even years.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc938fad0-7b29-4b7d-8d7d-c12a7cb759e8_661x375.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc938fad0-7b29-4b7d-8d7d-c12a7cb759e8_661x375.png" width="661" height="375" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/c938fad0-7b29-4b7d-8d7d-c12a7cb759e8_661x375.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":375,"width":661,"resizeWidth":null,"bytes":42670,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><h2>How to navigate the fallout? Just follow trends!</h2><p>While nobody can predict the timing or magnitude of these events, one thing we know is that large-scale price events (LSPEs) invariably unfold as trends and these can span many months and even years. Indeed, in “The Art of War,” written more than 2,000 years ago, <strong>Sun Tzu</strong> said that there are three great avenues of opportunity: events, trends and conditions.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59262d52-ea4c-4ac4-b109-b70b5eced36a_337x159.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59262d52-ea4c-4ac4-b109-b70b5eced36a_337x159.png" width="337" height="159" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/59262d52-ea4c-4ac4-b109-b70b5eced36a_337x159.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":159,"width":337,"resizeWidth":null,"bytes":40238,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div></div></div></a></figure></div><p>In the current British crisis, we seem to have all three of these avenues converging: the financial and economic <em>conditions</em> are causing <em>events</em> which will trigger great <em>trends</em>, which could be for future history books. Here’s how German imperial bund fared through the dying days of the Weimar Republic:</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9465b5d6-94ca-4819-a1cf-073e6f955658_761x354.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9465b5d6-94ca-4819-a1cf-073e6f955658_761x354.png" width="761" height="354" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/9465b5d6-94ca-4819-a1cf-073e6f955658_761x354.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":354,"width":761,"resizeWidth":null,"bytes":222085,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a><figcaption data-sanitized-class="image-caption">We’ll only know with time, but the risk on bonds is on the downside.</figcaption></figure></div><p>Of course, such events are only obvious in hindsight. How to navigate them in real time is far from obvious. The most reliable way to do so is by relying on quality trend following strategies. Trend following cuts through the information overload straight to the final product of financial analysis: crystal clear, actionable decisions that will keep you on the right side of important trends in any market.</p><h2>Our navigation aide…</h2><p>That is precisely the kind of decision support we offer through our daily I-System <a href="https://isystem-tf.com/trendcompass/">TrendCompass reports</a>. They’re based on <a href="https://isystem-tf.com/i-system/">time-tested algorithms</a> that my team and I developed 25 years ago and have used daily ever since. They helped us generate a <a href="https://isystem-tf.com/performance/">stellar track record</a> in live trading and today these same algorithms are generating the signals you can receive daily through <a href="https://isystem-tf.com/trendcompass/">TrendCompass reports</a>.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29506c17-68ca-4e53-ab1e-ad7e6077b0d9_691x345.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29506c17-68ca-4e53-ab1e-ad7e6077b0d9_691x345.png" width="691" height="345" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/29506c17-68ca-4e53-ab1e-ad7e6077b0d9_691x345.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":345,"width":691,"resizeWidth":null,"bytes":94722,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><p>The signals will tell you when to go long, when to go short, when to cut your losses and when to take profits in any market. In over two decades, we have never once failed to capture windfalls from significant trends, in bull and bear markets. Recently, we launched a <a href="https://trendcompass.substack.com/">TrendCompass report on Substack</a> covering 16 key global markets which include the British pound, British gilt and FTSE 100 stock index (it’s priced at less than $1/day for top notch trend following signals).</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc90343ca-3db3-44c1-af61-9d499013f02a_771x435.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc90343ca-3db3-44c1-af61-9d499013f02a_771x435.png" width="771" height="435" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/c90343ca-3db3-44c1-af61-9d499013f02a_771x435.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":435,"width":771,"resizeWidth":null,"bytes":103541,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><h2>Thank you for reading! I wish you much health, happiness, prosperity and peace in 2025 and beyond</h2><p>As 2024 is drawing to a close, I wish you an excellent start in the new year with prayers for good health, happiness, prosperity and peace. Perhaps 2025 will see a great transformation begin to unfold in Britain, with the collapse of the old imperial establishment. </p><p>If so, good riddance, it could be a good thing, and better still if we can profit from its collapse and set off into the new new normal intact and capable of contributing to the building of a better system, more conducive to people's happiness and prosperity.</p><div><hr></div><p>Notes:</p><p><a href="https://alexkrainer.substack.com/p/the-fall-of-britain-part-2#_ftnref1">[1]</a> Thanks to the 2010 Dodd-Frank Act, the Fed is exempt from Freedom of Information Act</p><div data-attrs='{"url":"https://alexkrainer.substack.com/subscribe?","text":"Subscribe","language":"en"}' data-component-name="SubscribeWidgetToDOM" data-sanitized-class="subscription-widget-wrap-editor"><div data-sanitized-class="subscription-widget show-subscribe"><div data-sanitized-class="preamble"><p data-sanitized-class="cta-caption">Alex Krainer's Substack is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><div data-sanitized-class="fake-input-wrapper"><div data-sanitized-class="fake-input"></div><div data-sanitized-class="fake-button"></div></div></div></div><p><strong><a href="http://linkedin.com/in/alex-sasha-krainer-0b74ab1a">Alex Krainer</a> – <a href="https://twitter.com/NakedHedgie">@NakedHedgie</a></strong> is the creator of <strong><a href="https://isystem-tf.com/">I-System Trend Following</a></strong> and publisher of daily <strong><a href="https://isystem-tf.com/trendcompass/">TrendCompass</a></strong> investor reports which cover over 200 financial and commodities markets. One-month test drive is always free of charge, <strong>no jumping through hoops to cancel</strong>. To start your trial subscription, drop us an email at <a href="mailto:TrendCompass@ISystem-TF.com">TrendCompass@ISystem-TF.com</a> - or check out  <strong><a href="https://trendcompass.substack.com/">TrendCompass on Substack</a></strong>!</p><p>For<strong> <a href="https://isystem-tf.com/solutions/u-s-investors/">US investors</a></strong>, we propose a trend-driven inflation/recession resilient portfolio covering a basket of 30+ financial and commodities markets. Further information is at <a href="https://isystem-tf.com/solutions/u-s-investors/">link</a>.</p><div data-sanitized-class="captioned-image-container"><figure><a target="_blank" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0eb72b3a-6bb8-45a7-99dc-80ade8fcd266_1940x1046.png" data-component-name="Image2ToDOM" data-sanitized-class="image-link image2 is-viewable-img"><div data-sanitized-class="image2-inset"><picture><source type="image/webp"><img src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0eb72b3a-6bb8-45a7-99dc-80ade8fcd266_1940x1046.png" width="1456" height="785" data-attrs='{"src":"https://substack-post-media.s3.amazonaws.com/public/images/0eb72b3a-6bb8-45a7-99dc-80ade8fcd266_1940x1046.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":785,"width":1456,"resizeWidth":null,"bytes":1745626,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false,"align":null}' alt="" loading="lazy" data-sanitized-class="sizing-normal"></picture><div data-sanitized-class="image-link-expand"><div data-sanitized-class="pencraft pc-display-flex pc-gap-8 pc-reset"><div data-sanitized-class="pencraft pc-reset icon-container restack-image"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></div><div data-sanitized-class="pencraft pc-reset icon-container view-image"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></div></div></div></div></a></figure></div><p></p>

attributes:
{"enclosures":[{"url":"https://api.substack.com/feed/podcast/153916158/b5155c443400898f868cc2e5188e9ce7.mp3","type":"audio/mpeg","length":0}]}


