diff options
Diffstat (limited to 'web/script')
m--------- | web/script/jshelper | 0 | ||||
-rw-r--r-- | web/script/player/mod.ts | 9 |
2 files changed, 5 insertions, 4 deletions
diff --git a/web/script/jshelper b/web/script/jshelper -Subproject 17fbd41f033ca7aa11f91785904220ed509de1f +Subproject c6ada7c013956d25a055334b24f96658f12ee68 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)) |