@@ -100,9 +100,9 @@ def test_headers_in_language(page_url: tuple[Page, str], route: str) -> None:
100100 assert response .status == 200
101101 doc_lang = page .evaluate ("document.documentElement.lang" )
102102 # lang = route.lstrip("/").split("/", maxsplit=1)[
103- # 0
103+ # 0
104104 # ] # urls start with the language if not en
105- assert doc_lang == 'en'
105+ assert doc_lang == "en"
106106
107107 axe = Axe ()
108108 results = axe .run (page , options = {"runOnly" : ["wcag2a" , "wcag2aa" ]})
@@ -191,20 +191,20 @@ def test_page_blog_posts(
191191 page , live_server_url = page_url
192192 entry_stem , frontmatter = post
193193 url = f"{ live_server_url } /{ entry_stem } /"
194-
195-
194+
196195 # Increased timeout and added wait_until="networkidle"
197196 page .goto (url , timeout = 60000 , wait_until = "networkidle" )
198-
197+
199198 # More robust waiting for the meta description
200199 page .wait_for_selector (
201- 'meta[name="description"]' ,
202- timeout = 10000 ,
203- state = "attached" ,
204- )
205-
200+ 'meta[name="description"]' ,
201+ timeout = 10000 ,
202+ state = "attached" ,
203+ )
206204
207205 axe = Axe ()
208206 results = axe .run (page , options = {"runOnly" : ["wcag2a" , "wcag2aa" ]})
209207
210- assert (len (results ["violations" ]) == 0 ), f"Accessibility violations found: { results ['violations' ]} "
208+ assert (
209+ len (results ["violations" ]) == 0
210+ ), f"Accessibility violations found: { results ['violations' ]} "
0 commit comments