Skip to content

Commit 59d2076

Browse files
authored
fix accessibility issues in demos and website (#861)
1 parent d20da24 commit 59d2076

File tree

14 files changed

+4786
-7466
lines changed

14 files changed

+4786
-7466
lines changed

samples/javascript/scoreboard/package.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,14 @@
3232
"devDependencies": {
3333
"@types/compression": "^1.7.2",
3434
"@types/express": "^4.17.13",
35+
"@types/webpack-env": "^1.18.0",
3536
"@types/ws": "^8.2.2",
3637
"@typescript-eslint/eslint-plugin": "^5.12.1",
3738
"@typescript-eslint/parser": "^5.12.1",
38-
"@vue/cli-plugin-babel": "^5.0.4",
39-
"@vue/cli-plugin-eslint": "^5.0.4",
40-
"@vue/cli-plugin-typescript": "~5.0.4",
41-
"@vue/cli-plugin-vuex": "~5.0.4",
42-
"@vue/cli-service": "^5.0.4",
4339
"@vue/compiler-sfc": "^3.2.31",
4440
"@vue/eslint-config-prettier": "^6.0.0",
4541
"@vue/eslint-config-typescript": "^10.0.0",
4642
"@vue/runtime-dom": "^3.2.24",
47-
"axios": "^0.24.0",
4843
"concurrently": "^7.2.1",
4944
"copy-webpack-plugin": "^11.0.0",
5045
"css-loader": "^6.5.1",
@@ -63,10 +58,8 @@
6358
"ts-loader": "^9.3.0",
6459
"ts-node": "^10.9.1",
6560
"typescript": "~4.5.5",
66-
"vue": "^3.2.23",
6761
"vue-loader": "^16.8.3",
6862
"vue-router": "^4.0.12",
69-
"vuex": "^4.0.2",
7063
"webpack": "^5.71.0",
7164
"webpack-cli": "^4.9.2",
7265
"webpack-dev-server": "^4.6.0",

samples/javascript/scoreboard/src/client/components/LiveMatches.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
<span> &nbsp; </span>
88
</el-row>
99
<el-row justify="space-around" class="horizontal-center">
10-
<img class="thumbnail-image" :src="c.thumbnails[0].value" aria-label="thumbnail image"/>
10+
<img class="thumbnail-image" :src="c.thumbnails[0].value" :alt="`${c.teams[0]} thumbnail`" :aria-label="`${c.teams[0]} thumbnail`"/>
1111
{{ c.scores[0] + ' : ' + c.scores[1] }}
12-
<img class="thumbnail-image" :src="c.thumbnails[1].value" aria-label="thumbnail image"/>
12+
<img class="thumbnail-image" :src="c.thumbnails[1].value" :alt="`${c.teams[1]} thumbnail`" :aria-label="`${c.teams[1]} thumbnail`"/>
1313
</el-row>
1414
</el-card>
1515
</el-col>

samples/javascript/scoreboard/src/client/components/MatchDetails.vue

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<el-tag type="danger" size="medium" class="live" effect="dark" color="#bc5151">● Live </el-tag>
66
</el-col>
77
<el-col :span="12" :offset="4" class="horizontal-center vertical-center">
8-
<img class="title-logo" :src="titleLogo" aria-label="team logo image"/>
8+
<img class="title-logo" :src="titleLogo" alt="World Q League logo" aria-label="World Q League logo"/>
99
<div class="title">World Q League</div>
1010
</el-col>
1111
</el-row>
1212
<el-divider></el-divider>
1313
<el-row class="scores horizontal-center">
1414
<el-col class="logo-col" :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
15-
<img :src="logoL" class="logo" aria-label="left side team logo image"/>
15+
<img :src="logoL" class="logo" :alt="`${teams.teamL} logo`" :aria-label="`${teams.teamL} logo`"/>
1616
</el-col>
1717
<el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
1818
<el-row class="vs-container" justify="space-around">
@@ -23,7 +23,7 @@
2323
</el-col>
2424
<el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
2525
<div class="logo-col">
26-
<img :src="logoR" class="logo" aria-label="right side team logo image"/>
26+
<img :src="logoR" class="logo" :alt="`${teams.teamR} logo`" :aria-label="`${teams.teamR} logo`"/>
2727
</div>
2828
</el-col>
2929
</el-row>
@@ -34,11 +34,22 @@
3434
</el-row>
3535
<el-row>
3636
<el-col :span="24">
37-
<el-table :data="tableData" class="table" :header-cell-style="{ color: 'black' }" :cell-class-name="() => 'table-cell'">
38-
<el-table-column prop="quarter" label="" />
39-
<el-table-column prop="scoreL" :label="teams.teamL" />
40-
<el-table-column prop="scoreR" :label="teams.teamR" />
41-
</el-table>
37+
<table class="table" aria-label="Match details by quarter">
38+
<thead>
39+
<tr>
40+
<th scope="col">Quarter</th>
41+
<th scope="col">{{ teams.teamL }}</th>
42+
<th scope="col">{{ teams.teamR }}</th>
43+
</tr>
44+
</thead>
45+
<tbody>
46+
<tr v-for="(row, index) in tableData" :key="index">
47+
<th scope="row">{{ row.quarter }}</th>
48+
<td>{{ row.scoreL }}</td>
49+
<td>{{ row.scoreR }}</td>
50+
</tr>
51+
</tbody>
52+
</table>
4253
</el-col>
4354
</el-row>
4455
</el-card>
@@ -56,7 +67,7 @@ import { anime } from '@maybecode/vue-next-animejs'
5667
import 'element-plus/theme-chalk/display.css'
5768
5869
const teams = ref(new MatchTeams('', ''))
59-
const tableData = ref([{}])
70+
const tableData = ref([] as Array<{ quarter: string; scoreL: number; scoreR: number }>)
6071
const scores = ref([0, 0] as [number, number])
6172
const logoL = ref('')
6273
const logoR = ref('')
@@ -145,5 +156,5 @@ function getQuarterText(index: number): string {
145156
}
146157
.vs-separator {
147158
color: rgb(241, 242, 246);
148-
}
159+
}
149160
</style>

samples/javascript/scoreboard/src/client/components/PastMatches.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<el-col :span="24">
99
<el-row class="match horizontal-center" v-for="(s, i) in c.scores" :key="i">
1010
<el-col :span="3">
11-
<img class="thumbnail-image" :src="c.thumbnails[i].value" aria-label="thumbnail image"/>
11+
<img class="thumbnail-image" :src="c.thumbnails[i].value" :alt="`${c.teams[i]} thumbnail`" :aria-label="`${c.teams[i]} thumbnail`"/>
1212
</el-col>
1313
<el-col class="horizontal-center" :span="2" :offset="1"> {{ c.teams[i] }} </el-col>
1414
<el-col class="horizontal-center" :offset="10" :span="1"> {{ s }}</el-col>

samples/javascript/scoreboard/src/client/public/images/thumbnails/JZer.png renamed to samples/javascript/scoreboard/src/client/public/images/thumbnails/Jzer.png

File renamed without changes.

samples/javascript/scoreboard/src/client/public/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<!DOCTYPE html>
2-
<html lang="">
2+
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
7+
<title>Real-time Scoreboard - Azure Web PubSub Demo</title>
78
</head>
89
<body>
910
<noscript> </noscript>

0 commit comments

Comments
 (0)