Opened 8 years ago
Closed 8 years ago
#2371 closed defect (bug) (fixed)
HTML parsing issue in handbooks
Reported by: | samuelsidler | Owned by: | coffee2code |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Handbooks | Keywords: | has-patch |
Cc: |
Description (last modified by )
The handbooks menu in the sidebar (e.g. "Contents" on make/themes) shows the following code:
<h1 class="widget-title">Contents</h2>
Note the error? Okay, there's two:
- The opening and closing tags should match.
- The headings shouldn't be an
<h1>
at all, for accessibility purposes.
Attachments (1)
Change History (11)
#4
@
8 years ago
- Owner set to coffee2code
- Resolution set to fixed
- Status changed from new to closed
In 4626:
#5
@
8 years ago
@samuelsidler: I wouldn't say the sidebar header should be <nav>
, though a <nav>
could be used to wrap the <ul>
containing the widget's links (optionally including the <h2>
widget header).
#6
@
8 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
This was undone by @pento in [4690], which reintroduces the mismatch widget title tags for the table of contents as reported here.
Naturally, that can be fixed while still retaining the revert that happened, but @samuelsidler expressed a desire not to use h1
for the widget title.
Also, the use of h1
messes up the style of the table of contents (aka "Chapters") title for DevHub handbooks (again, styling can be changed there if we're sticking with h1
).
What was the reason for having h1
as the widget title tag instead of h2
? (I'm assuming for o2, so I mean more specifically than that.)
The opening tag is in WPorg_Handbook::handbook_sidebar(), and the closing tag is in WPorg_Handbook_Pages_Widget::widget().
<h1>
was introduced in [3686],register_sidebar()
default is<h2 class="widgettitle">
.meta-2371.patch changes it back to
<h2>
.