aboutsummaryrefslogtreecommitdiff
path: root/web/script/player
diff options
context:
space:
mode:
Diffstat (limited to 'web/script/player')
-rw-r--r--web/script/player/mod.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/web/script/player/mod.ts b/web/script/player/mod.ts
index 2defa6e..f290db4 100644
--- a/web/script/player/mod.ts
+++ b/web/script/player/mod.ts
@@ -91,6 +91,7 @@ function initialize_player(el: HTMLElement, node_id: string) {
const enabled = active.length > 0
return e("button", MEDIA_KIND_ICONS[kind][+enabled], {
class: "icon",
+ aria_label: `configure ${kind}`,
onclick: () => {
if (enabled) {
for (const t of active) {
@@ -141,7 +142,7 @@ function initialize_player(el: HTMLElement, node_id: string) {
// TODO show loading indicator
}
return e("li", { class: active ? ["active"] : [] },
- e("button", { class: "jsp-track-state", onclick }, active ? "-" : "+"), " ",
+ e("button", { class: ["jsp-track-state", "icon"], onclick }, active ? "remove" : "add"), " ",
e("span", { class: "jsp-track-name" }, `"${track.name}"`), " ",
e("span", { class: "jsp-track-lang" }, `(${track.language})`)
)
@@ -154,7 +155,7 @@ function initialize_player(el: HTMLElement, node_id: string) {
}
const settings_popup = () => {
- const button = e("button", "settings", { class: "icon" })
+ const button = e("button", "settings", { class: "icon", aria_label: "settings" })
new Popup(button, popups, () => e("div", { class: "jsp-settings-popup" },
e("h2", "Settings"),
playersync_controls(sync_state, player),
@@ -169,7 +170,7 @@ function initialize_player(el: HTMLElement, node_id: string) {
const controls = e("div", { class: "jsp-controls" },
player.playing.map(playing =>
- e("button", { class: "icon" }, playing ? "pause" : "play_arrow", { onclick: toggle_playing })
+ e("button", { class: "icon", aria_label: "toggle pause/play" }, playing ? "pause" : "play_arrow", { onclick: toggle_playing })
),
e("p", { class: "jsp-status" },
player.position.map(v => e("span", show.duration(v))), e("br"),
@@ -208,7 +209,7 @@ function initialize_player(el: HTMLElement, node_id: string) {
track_select("subtitles")
),
settings_popup(),
- e("button", "fullscreen", { class: "icon", onclick: toggle_fullscreen })
+ e("button", "fullscreen", { class: "icon", onclick: toggle_fullscreen, aria_label: "fullscreen" })
)
player.position.onchangeinit(p => pri_current.style.width = pri_map(p))