Skip to content

Commit 30a8960

Browse files
Refactor 404 error page to use div instead of p for search form
The search form on the 404 error page was previously wrapped in a `<p>` tag, which is semantically incorrect as `<p>` tags cannot contain block-level elements like `<form>`. This commit refactors the page to use a `<div>` tag instead, which is a more appropriate container for the search form. This change improves the semantic structure of the page and avoids potential rendering issues.
1 parent ad65ae8 commit 30a8960

File tree

2 files changed

+31
-18
lines changed

2 files changed

+31
-18
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 8.3.4-wip
22
* The URL for category pages now uses _category name_ instead of
33
_category `displayName`_.
4+
* Refactor 404 error page to use div instead of p for search form.
45

56
## 8.3.3
67

lib/templates/404error.html

+30-18
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,39 @@
11
{{>head}}
22

3-
<div id="dartdoc-main-content" class="main-content">
4-
<h1>404: Something's gone wrong :-(</h1>
3+
<div id="dartdoc-main-content" class="main-content">
4+
<h1>404: Something's gone wrong :-(</h1>
55

6-
<section class="desc">
7-
<p>You've tried to visit a page that doesn't exist. Luckily this site
8-
has other <a href="index.html">pages</a>.</p>
9-
<p>If you were looking for something specific, try searching:
6+
<section class="desc">
7+
<p>
8+
You've tried to visit a page that doesn't exist. Luckily this site has
9+
other <a href="index.html">pages</a>.
10+
</p>
11+
<div>
12+
If you were looking for something specific, try searching:
1013
<form class="search-body" role="search">
11-
<input type="text" id="search-body" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
14+
<input
15+
type="text"
16+
id="search-body"
17+
autocomplete="off"
18+
disabled
19+
class="form-control typeahead"
20+
placeholder="Loading search..."
21+
/>
1222
</form>
13-
</p>
23+
</div>
24+
</section>
25+
</div>
26+
<!-- /.main-content -->
1427

15-
</section>
16-
</div> <!-- /.main-content -->
28+
<div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
29+
{{>search_sidebar}}
30+
<h5>
31+
<span class="package-name">{{self.name}}</span>
32+
<span class="package-kind">{{self.kind}}</span>
33+
</h5>
34+
{{>packages}}
35+
</div>
1736

18-
<div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
19-
{{>search_sidebar}}
20-
<h5><span class="package-name">{{self.name}}</span> <span class="package-kind">{{self.kind}}</span></h5>
21-
{{>packages}}
22-
</div>
23-
24-
<div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
25-
</div>
37+
<div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right"></div>
2638

2739
{{>footer}}

0 commit comments

Comments
 (0)