Skip to content

Commit 56f92c5

Browse files
Gerrit0Nil2000
andcommitted
Remove headers improperly used as labels
Closes #2558 Closes #2557 Co-Authored-By: Anonymus2000 <54113952+nil2000@users.noreply.github.com>
1 parent 19df340 commit 56f92c5

File tree

4 files changed

+23
-19
lines changed

4 files changed

+23
-19
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,18 @@
5252
- Links added with the `navigationLinks` option are now moved into the pull out navigation on mobile displays, #2548.
5353
- `@license` and `@import` comments will be ignored at the top of files, #2552.
5454
- Fixed issue in documentation validation where constructor signatures where improperly considered not documented, #2553.
55+
- The color theme label in the default theme now has an accessible name, #2557.
5556
- Fixed issue where search results could not be navigated while Windows Narrator was on, #2563.
5657
- `charset` is now correctly cased in `<meta>` tag generated by the default theme, #2568.
58+
- Buttons to copy code now have the `type=button` attribute set to avoid being treated as submit buttons.
5759
- `--hostedBaseUrl` will now implicitly add a trailing slash to the generated URL.
5860

5961
### Thanks!
6062

6163
- @Aryakoste
6264
- @HarelM
6365
- @kraenhansen
66+
- @Nil2000
6467

6568
# Unreleased
6669

src/lib/output/themes/MarkedPlugin.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export class MarkedPlugin extends ContextAwareRendererComponent {
133133
return `<pre><code>${code}</code><button>Copy</button></pre>\n`;
134134
}
135135

136-
return `<pre><code class="${escapeHtml(lang)}">${code}</code><button>Copy</button></pre>\n`;
136+
return `<pre><code class="${escapeHtml(lang)}">${code}</code><button type="button">Copy</button></pre>\n`;
137137
},
138138
});
139139

src/lib/output/themes/default/partials/navigation.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ export function settings(context: DefaultThemeRenderContext) {
8383
<div class="tsd-accordion-details">
8484
{visibilityOptions.length && (
8585
<div class="tsd-filter-visibility">
86-
<h4 class="uppercase">{context.i18n.theme_member_visibility()}</h4>
87-
<form>
88-
<ul id="tsd-filter-options">{...visibilityOptions}</ul>
89-
</form>
86+
<span class="settings-label">{context.i18n.theme_member_visibility()}</span>
87+
<ul id="tsd-filter-options">{...visibilityOptions}</ul>
9088
</div>
9189
)}
9290
<div class="tsd-theme-toggle">
93-
<h4 class="uppercase">{context.i18n.theme_theme()}</h4>
91+
<label class="settings-label" for="tsd-theme">
92+
{context.i18n.theme_theme()}
93+
</label>
9494
<select id="tsd-theme">
9595
<option value="os">{context.i18n.theme_os()}</option>
9696
<option value="light">{context.i18n.theme_light()}</option>

static/style.css

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,6 @@ h6 {
302302
margin: 2.33rem 0;
303303
}
304304

305-
.uppercase {
306-
text-transform: uppercase;
307-
}
308-
309305
dl,
310306
menu,
311307
ol,
@@ -579,13 +575,13 @@ dl.tsd-comment-tag-group p {
579575
}
580576
.tsd-filter-input {
581577
display: flex;
582-
width: fit-content;
583578
width: -moz-fit-content;
579+
width: fit-content;
584580
align-items: center;
585-
user-select: none;
586581
-webkit-user-select: none;
587582
-moz-user-select: none;
588583
-ms-user-select: none;
584+
user-select: none;
589585
cursor: pointer;
590586
}
591587
.tsd-filter-input input[type="checkbox"] {
@@ -629,13 +625,18 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark {
629625
stroke: var(--color-accent);
630626
}
631627

632-
.tsd-theme-toggle {
633-
padding-top: 0.75rem;
628+
.settings-label {
629+
font-weight: bold;
630+
text-transform: uppercase;
631+
display: inline-block;
634632
}
635-
.tsd-theme-toggle > h4 {
636-
display: inline;
637-
vertical-align: middle;
638-
margin-right: 0.75rem;
633+
634+
.tsd-filter-visibility .settings-label {
635+
margin: 0.75rem 0 0.5rem 0;
636+
}
637+
638+
.tsd-theme-toggle .settings-label {
639+
margin: 0.75rem 0.75rem 0 0;
639640
}
640641

641642
.tsd-hierarchy {
@@ -814,10 +815,10 @@ a.tsd-index-link {
814815
}
815816
.tsd-accordion-summary,
816817
.tsd-accordion-summary a {
817-
user-select: none;
818818
-moz-user-select: none;
819819
-webkit-user-select: none;
820820
-ms-user-select: none;
821+
user-select: none;
821822

822823
cursor: pointer;
823824
}

0 commit comments

Comments
 (0)