Skip to content

Commit 96b9b58

Browse files
committed
Remove duplicate landmark from both header and page search on /search page, renamed page search form label to Search page search
1 parent e3eea2f commit 96b9b58

2 files changed

Lines changed: 24 additions & 46 deletions

File tree

axe-results-violations.json

Lines changed: 23 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,43 @@
11
[
22
{
3-
"id": "landmark-one-main",
3+
"id": "landmark-unique",
44
"impact": "moderate",
55
"tags": [
66
"cat.semantics",
77
"best-practice"
88
],
9-
"description": "Ensure the document has a main landmark",
10-
"help": "Document should have one main landmark",
11-
"helpUrl": "https://dequeuniversity.com/rules/axe/4.11/landmark-one-main?application=playwright",
9+
"description": "Ensure landmarks are unique",
10+
"help": "Landmarks should have a unique role or role/label/title (i.e. accessible name) combination",
11+
"helpUrl": "https://dequeuniversity.com/rules/axe/4.11/landmark-unique?application=playwright",
1212
"nodes": [
1313
{
14-
"any": [],
15-
"all": [
14+
"any": [
1615
{
17-
"id": "page-has-main",
18-
"data": null,
19-
"relatedNodes": [],
16+
"id": "landmark-is-unique",
17+
"data": {
18+
"role": "search",
19+
"accessibleText": "site search"
20+
},
21+
"relatedNodes": [
22+
{
23+
"html": "<form data-search-form=\"\" class=\"relative\" role=\"search\" aria-label=\"Site search\" data-astro-cid-yeu7u2zk=\"\" data-search-listener=\"true\">",
24+
"target": [
25+
".max-w-lg > form[data-search-form=\"\"][role=\"search\"][aria-label=\"Site search\"]"
26+
]
27+
}
28+
],
2029
"impact": "moderate",
21-
"message": "Document does not have a main landmark"
30+
"message": "The landmark must have a unique aria-label, aria-labelledby, or title to make landmarks distinguishable"
2231
}
2332
],
33+
"all": [],
2434
"none": [],
2535
"impact": "moderate",
26-
"html": "<html lang=\"en\" data-theme=\"light\">",
36+
"html": "<form data-search-form=\"\" data-state=\"closed\" class=\"flex items-center w-full h-(--header-icon-size) overflow-visible rounded-full data-[state=open]:bg-page-base data-[state=open]:shadow-elevated\" role=\"search\" aria-label=\"Site search\" data-search-listener=\"true\">",
2737
"target": [
28-
"html"
38+
".overflow-visible"
2939
],
30-
"failureSummary": "Fix all of the following:\n Document does not have a main landmark"
31-
}
32-
]
33-
},
34-
{
35-
"id": "page-has-heading-one",
36-
"impact": "moderate",
37-
"tags": [
38-
"cat.semantics",
39-
"best-practice"
40-
],
41-
"description": "Ensure that the page, or at least one of its frames contains a level-one heading",
42-
"help": "Page should contain a level-one heading",
43-
"helpUrl": "https://dequeuniversity.com/rules/axe/4.11/page-has-heading-one?application=playwright",
44-
"nodes": [
45-
{
46-
"any": [],
47-
"all": [
48-
{
49-
"id": "page-has-heading-one",
50-
"data": null,
51-
"relatedNodes": [],
52-
"impact": "moderate",
53-
"message": "Page must have a level-one heading"
54-
}
55-
],
56-
"none": [],
57-
"impact": "moderate",
58-
"html": "<html lang=\"en\" data-theme=\"light\">",
59-
"target": [
60-
"html"
61-
],
62-
"failureSummary": "Fix all of the following:\n Page must have a level-one heading"
40+
"failureSummary": "Fix any of the following:\n The landmark must have a unique aria-label, aria-labelledby, or title to make landmarks distinguishable"
6341
}
6442
]
6543
}

src/components/Search/SearchResults/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const query = (queryProp ?? Astro.url.searchParams.get('q') ?? '').trim()
2424
{
2525
showSearchBar && (
2626
<div class="max-w-lg mx-auto">
27-
<form data-search-form class="relative" role="search" aria-label="Site search">
27+
<form data-search-form class="relative" role="search" aria-label="Search page search">
2828
<div data-search-shell class="searchResultsShell relative flex items-center rounded-lg border border-trim bg-page-base shadow-sm">
2929
<input
3030
data-search-input

0 commit comments

Comments
 (0)