Skip to content

Commit 161fde4

Browse files
committed
Remove unsupported aria-labelledby attribute from search results header
1 parent a5aa5e3 commit 161fde4

3 files changed

Lines changed: 88 additions & 1 deletion

File tree

‎axe-results-incomplete.json‎

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
[
2+
{
3+
"id": "aria-prohibited-attr",
4+
"impact": "serious",
5+
"tags": [
6+
"cat.aria",
7+
"wcag2a",
8+
"wcag412",
9+
"EN-301-549",
10+
"EN-9.4.1.2",
11+
"RGAAv4",
12+
"RGAA-7.1.1"
13+
],
14+
"description": "Ensure ARIA attributes are not prohibited for an element's role",
15+
"help": "Elements must only use permitted ARIA attributes",
16+
"helpUrl": "https://dequeuniversity.com/rules/axe/4.11/aria-prohibited-attr?application=playwright",
17+
"nodes": [
18+
{
19+
"any": [],
20+
"all": [],
21+
"none": [
22+
{
23+
"id": "aria-prohibited-attr",
24+
"data": {
25+
"role": null,
26+
"nodeName": "header",
27+
"messageKey": "noRoleSingular",
28+
"prohibited": [
29+
"aria-labelledby"
30+
]
31+
},
32+
"relatedNodes": [],
33+
"impact": "serious",
34+
"message": "aria-labelledby attribute is not well supported on a header with no valid role attribute."
35+
}
36+
],
37+
"impact": "serious",
38+
"html": "<header class=\"space-y-4\" aria-labelledby=\"search-title\" data-astro-cid-yeu7u2zk=\"\">",
39+
"target": [
40+
".space-y-4"
41+
],
42+
"failureSummary": "Fix all of the following:\n aria-labelledby attribute is not well supported on a header with no valid role attribute."
43+
}
44+
]
45+
},
46+
{
47+
"id": "aria-valid-attr-value",
48+
"impact": "critical",
49+
"tags": [
50+
"cat.aria",
51+
"wcag2a",
52+
"wcag412",
53+
"EN-301-549",
54+
"EN-9.4.1.2",
55+
"RGAAv4",
56+
"RGAA-7.1.1"
57+
],
58+
"description": "Ensure all ARIA attributes have valid values",
59+
"help": "ARIA attributes must conform to valid values",
60+
"helpUrl": "https://dequeuniversity.com/rules/axe/4.11/aria-valid-attr-value?application=playwright",
61+
"nodes": [
62+
{
63+
"any": [],
64+
"all": [
65+
{
66+
"id": "aria-valid-attr-value",
67+
"data": {
68+
"messageKey": "noId",
69+
"needsReview": "aria-labelledby=\"search-title\""
70+
},
71+
"relatedNodes": [],
72+
"impact": "critical",
73+
"message": "ARIA attribute element ID does not exist on the page: aria-labelledby=\"search-title\""
74+
}
75+
],
76+
"none": [],
77+
"impact": "critical",
78+
"html": "<header class=\"space-y-4\" aria-labelledby=\"search-title\" data-astro-cid-yeu7u2zk=\"\">",
79+
"target": [
80+
".space-y-4"
81+
],
82+
"failureSummary": "Fix all of the following:\n ARIA attribute element ID does not exist on the page: aria-labelledby=\"search-title\""
83+
}
84+
]
85+
}
86+
]

‎axe-results-violations.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

‎src/components/Search/SearchResults/index.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const query = (queryProp ?? Astro.url.searchParams.get('q') ?? '').trim()
2020
class="block"
2121
>
2222
<div class="mx-auto w-full space-y-8 pb-8 sm:pb-12 px-4 sm:px-6 lg:px-8">
23-
<header class="space-y-4" aria-labelledby="search-title">
23+
<header class="space-y-4">
2424
{
2525
showSearchBar && (
2626
<div class="max-w-lg mx-auto">

0 commit comments

Comments
 (0)