Skip to content

Commit 6bfdc6d

Browse files
Accessibility fixes and other small code changes (#4781)
Fixes: - Small code refactoring - #4748 - #4783 - #4747
1 parent 779eeb0 commit 6bfdc6d

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

apps/pwabuilder/src/script/pages/app-report.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2800,26 +2800,25 @@ export class AppReport extends LitElement {
28002800
})
28012801

28022802
if(yellow + purple + red != 0){
2803+
2804+
let redClassMap = classMap({'indicator' : true, 'selected': this.filterList.includes("required")});
2805+
let yellowClassMap = classMap({'indicator' : true, 'selected': this.filterList.includes("recommended")});
2806+
let purpleClassMap = classMap({'indicator' : true, 'selected': this.filterList.includes("enhancement")});
2807+
28032808
return html`
28042809
<div id="indicators-holder">
28052810
${red != 0 ?
2806-
this.filterList.includes("required") ?
2807-
html`<button type="button" class="indicator selected" tabindex="0" @click=${(e: Event) => this.filterTodoItems("required", e)}><img src=${stop_white_src} alt="invalid result icon"/><p>${red}</p></button>` :
2808-
html`<button type="button" class="indicator" tabindex="0" @click=${(e: Event) => this.filterTodoItems("required", e)}><img src=${stop_src} alt="invalid result icon"/><p>${red}</p></button>`
2811+
html`<button type="button" class=${redClassMap} tabindex="0" @click=${(e: Event) => this.filterTodoItems("required", e)}><img src=${this.filterList.includes("required") ? stop_white_src : stop_src} alt="invalid result icon"/><p>${red}</p></button>`
28092812
: null
28102813
}
28112814
${yellow != 0 ?
2812-
this.filterList.includes("recommended") || this.filterList.includes("optional") ?
2813-
html`<button type="button" class="indicator selected" tabindex="0" @click=${(e: Event) => this.filterTodoItems("yellow", e)}><img src=${yield_white_src} alt="yield result icon"/><p>${yellow}</p></button>` :
2814-
html`<button type="button" class="indicator" tabindex="0" @click=${(e: Event) => this.filterTodoItems("yellow", e)}><img src=${yield_src} alt="yield result icon"/><p>${yellow}</p></button>`
2815+
html`<button type="button" class=${yellowClassMap} tabindex="0" @click=${(e: Event) => this.filterTodoItems("yellow", e)}><img src=${this.filterList.includes("recommended") ? yield_white_src : yield_src} alt="yield result icon"/><p>${yellow}</p></button>`
28152816
: null
28162817
}
28172818
${purple != 0 ?
2818-
this.filterList.includes("enhancement") ?
2819-
html`<button type="button" class="indicator selected" tabindex="0" @click=${(e: Event) => this.filterTodoItems("enhancement", e)}><img src=${enhancement_white_src} alt="enhancement result icon"/><p>${purple}</p></button>` :
2820-
html`<button type="button" class="indicator" tabindex="0" @click=${(e: Event) => this.filterTodoItems("enhancement", e)}><img src=${enhancement_src} alt="enhancement result icon"/><p>${purple}</p></button>`
2821-
: null
2822-
}
2819+
html`<button type="button" class=${purpleClassMap} tabindex="0" @click=${(e: Event) => this.filterTodoItems("enhancement", e)}><img src=${this.filterList.includes("enhancement") ? enhancement_white_src : enhancement_src} alt="enhancement result icon"/><p>${purple}</p></button>`
2820+
: null
2821+
}
28232822
</div>`
28242823
}
28252824
return null;

docs/styles/global.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ sl-menu-item::part(base) {
110110
margin-right: 2px;
111111
border-radius: 20px;
112112
font-weight: 500;
113+
border: 1px solid transparent;
113114
}
114115

115116
sl-menu-item[checked]::part(base) {

docs/styles/vs-prism.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127

128128
.token.class-name,
129129
.language-json .token.property {
130-
color: #2B91AF;
130+
color: #247b95;
131131
}
132132

133133
.token.tag,
@@ -155,7 +155,7 @@
155155
}
156156

157157
.line-numbers .line-numbers-rows > span:before {
158-
color: #2B91AF;
158+
color: #247b95;
159159
}
160160

161161
/* overrides color-values for the Line Highlight plugin

0 commit comments

Comments
 (0)