Merge branch '610-link-to-button' into 'develop'
Fix #610: Use role=button instead of empty links for player controls Closes #610 See merge request funkwhale/funkwhale!536
This commit is contained in:
commit
110f5208a8
|
@ -0,0 +1 @@
|
||||||
|
Use role=button instead of empty links for player controls (#610)
|
|
@ -73,71 +73,71 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="two wide column controls ui grid">
|
<div class="two wide column controls ui grid">
|
||||||
<a
|
<span
|
||||||
href
|
role="button"
|
||||||
:title="labels.previousTrack"
|
:title="labels.previousTrack"
|
||||||
:aria-label="labels.previousTrack"
|
:aria-label="labels.previousTrack"
|
||||||
class="two wide column control"
|
class="two wide column control"
|
||||||
@click.prevent.stop="previous"
|
@click.prevent.stop="previous"
|
||||||
:disabled="emptyQueue">
|
:disabled="emptyQueue">
|
||||||
<i :class="['ui', 'backward step', {'disabled': emptyQueue}, 'secondary', 'icon']"></i>
|
<i :class="['ui', 'backward step', {'disabled': emptyQueue}, 'secondary', 'icon']"></i>
|
||||||
</a>
|
</span>
|
||||||
<a
|
<span
|
||||||
href
|
role="button"
|
||||||
v-if="!playing"
|
v-if="!playing"
|
||||||
:title="labels.play"
|
:title="labels.play"
|
||||||
:aria-label="labels.play"
|
:aria-label="labels.play"
|
||||||
@click.prevent.stop="togglePlay"
|
@click.prevent.stop="togglePlay"
|
||||||
class="two wide column control">
|
class="two wide column control">
|
||||||
<i :class="['ui', 'play', {'disabled': !currentTrack}, 'secondary', 'icon']"></i>
|
<i :class="['ui', 'play', {'disabled': !currentTrack}, 'secondary', 'icon']"></i>
|
||||||
</a>
|
</span>
|
||||||
<a
|
<span
|
||||||
href
|
role="button"
|
||||||
v-else
|
v-else
|
||||||
:title="labels.pause"
|
:title="labels.pause"
|
||||||
:aria-label="labels.pause"
|
:aria-label="labels.pause"
|
||||||
@click.prevent.stop="togglePlay"
|
@click.prevent.stop="togglePlay"
|
||||||
class="two wide column control">
|
class="two wide column control">
|
||||||
<i :class="['ui', 'pause', {'disabled': !currentTrack}, 'secondary', 'icon']"></i>
|
<i :class="['ui', 'pause', {'disabled': !currentTrack}, 'secondary', 'icon']"></i>
|
||||||
</a>
|
</span>
|
||||||
<a
|
<span
|
||||||
href
|
role="button"
|
||||||
:title="labels.next"
|
:title="labels.next"
|
||||||
:aria-label="labels.next"
|
:aria-label="labels.next"
|
||||||
class="two wide column control"
|
class="two wide column control"
|
||||||
@click.prevent.stop="next"
|
@click.prevent.stop="next"
|
||||||
:disabled="!hasNext">
|
:disabled="!hasNext">
|
||||||
<i :class="['ui', {'disabled': !hasNext}, 'forward step', 'secondary', 'icon']" ></i>
|
<i :class="['ui', {'disabled': !hasNext}, 'forward step', 'secondary', 'icon']" ></i>
|
||||||
</a>
|
</span>
|
||||||
<div
|
<div
|
||||||
class="wide column control volume-control"
|
class="wide column control volume-control"
|
||||||
v-on:mouseover="showVolume = true"
|
v-on:mouseover="showVolume = true"
|
||||||
v-on:mouseleave="showVolume = false"
|
v-on:mouseleave="showVolume = false"
|
||||||
v-bind:class="{ active : showVolume }">
|
v-bind:class="{ active : showVolume }">
|
||||||
<a
|
<span
|
||||||
href
|
role="button"
|
||||||
v-if="volume === 0"
|
v-if="volume === 0"
|
||||||
:title="labels.unmute"
|
:title="labels.unmute"
|
||||||
:aria-label="labels.unmute"
|
:aria-label="labels.unmute"
|
||||||
@click.prevent.stop="unmute">
|
@click.prevent.stop="unmute">
|
||||||
<i class="volume off secondary icon"></i>
|
<i class="volume off secondary icon"></i>
|
||||||
</a>
|
</span>
|
||||||
<a
|
<span
|
||||||
href
|
role="button"
|
||||||
v-else-if="volume < 0.5"
|
v-else-if="volume < 0.5"
|
||||||
:title="labels.mute"
|
:title="labels.mute"
|
||||||
:aria-label="labels.mute"
|
:aria-label="labels.mute"
|
||||||
@click.prevent.stop="mute">
|
@click.prevent.stop="mute">
|
||||||
<i class="volume down secondary icon"></i>
|
<i class="volume down secondary icon"></i>
|
||||||
</a>
|
</span>
|
||||||
<a
|
<span
|
||||||
href
|
role="button"
|
||||||
v-else
|
v-else
|
||||||
:title="labels.mute"
|
:title="labels.mute"
|
||||||
:aria-label="labels.mute"
|
:aria-label="labels.mute"
|
||||||
@click.prevent.stop="mute">
|
@click.prevent.stop="mute">
|
||||||
<i class="volume up secondary icon"></i>
|
<i class="volume up secondary icon"></i>
|
||||||
</a>
|
</span>
|
||||||
<input
|
<input
|
||||||
type="range"
|
type="range"
|
||||||
step="0.05"
|
step="0.05"
|
||||||
|
@ -147,17 +147,17 @@
|
||||||
v-if="showVolume" />
|
v-if="showVolume" />
|
||||||
</div>
|
</div>
|
||||||
<div class="two wide column control looping" v-if="!showVolume">
|
<div class="two wide column control looping" v-if="!showVolume">
|
||||||
<a
|
<span
|
||||||
href
|
role="button"
|
||||||
v-if="looping === 0"
|
v-if="looping === 0"
|
||||||
:title="labels.loopingDisabled"
|
:title="labels.loopingDisabled"
|
||||||
:aria-label="labels.loopingDisabled"
|
:aria-label="labels.loopingDisabled"
|
||||||
@click.prevent.stop="$store.commit('player/looping', 1)"
|
@click.prevent.stop="$store.commit('player/looping', 1)"
|
||||||
:disabled="!currentTrack">
|
:disabled="!currentTrack">
|
||||||
<i :class="['ui', {'disabled': !currentTrack}, 'step', 'repeat', 'secondary', 'icon']"></i>
|
<i :class="['ui', {'disabled': !currentTrack}, 'step', 'repeat', 'secondary', 'icon']"></i>
|
||||||
</a>
|
</span>
|
||||||
<a
|
<span
|
||||||
href
|
role="button"
|
||||||
@click.prevent.stop="$store.commit('player/looping', 2)"
|
@click.prevent.stop="$store.commit('player/looping', 2)"
|
||||||
:title="labels.loopingSingle"
|
:title="labels.loopingSingle"
|
||||||
:aria-label="labels.loopingSingle"
|
:aria-label="labels.loopingSingle"
|
||||||
|
@ -167,9 +167,9 @@
|
||||||
class="repeat secondary icon">
|
class="repeat secondary icon">
|
||||||
<span class="ui circular tiny orange label">1</span>
|
<span class="ui circular tiny orange label">1</span>
|
||||||
</i>
|
</i>
|
||||||
</a>
|
</span>
|
||||||
<a
|
<span
|
||||||
href
|
role="button"
|
||||||
:title="labels.loopingWhole"
|
:title="labels.loopingWhole"
|
||||||
:aria-label="labels.loopingWhole"
|
:aria-label="labels.loopingWhole"
|
||||||
v-if="looping === 2"
|
v-if="looping === 2"
|
||||||
|
@ -178,10 +178,10 @@
|
||||||
<i
|
<i
|
||||||
class="repeat orange secondary icon">
|
class="repeat orange secondary icon">
|
||||||
</i>
|
</i>
|
||||||
</a>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a
|
<span
|
||||||
href
|
role="button"
|
||||||
:disabled="queue.tracks.length === 0"
|
:disabled="queue.tracks.length === 0"
|
||||||
:title="labels.shuffle"
|
:title="labels.shuffle"
|
||||||
:aria-label="labels.shuffle"
|
:aria-label="labels.shuffle"
|
||||||
|
@ -190,10 +190,10 @@
|
||||||
class="two wide column control">
|
class="two wide column control">
|
||||||
<div v-if="isShuffling" class="ui inline shuffling inverted tiny active loader"></div>
|
<div v-if="isShuffling" class="ui inline shuffling inverted tiny active loader"></div>
|
||||||
<i v-else :class="['ui', 'random', 'secondary', {'disabled': queue.tracks.length === 0}, 'icon']" ></i>
|
<i v-else :class="['ui', 'random', 'secondary', {'disabled': queue.tracks.length === 0}, 'icon']" ></i>
|
||||||
</a>
|
</span>
|
||||||
<div class="one wide column" v-if="!showVolume"></div>
|
<div class="one wide column" v-if="!showVolume"></div>
|
||||||
<a
|
<span
|
||||||
href
|
role="button"
|
||||||
:disabled="queue.tracks.length === 0"
|
:disabled="queue.tracks.length === 0"
|
||||||
:title="labels.clear"
|
:title="labels.clear"
|
||||||
:aria-label="labels.clear"
|
:aria-label="labels.clear"
|
||||||
|
@ -201,7 +201,7 @@
|
||||||
@click.prevent.stop="clean()"
|
@click.prevent.stop="clean()"
|
||||||
class="two wide column control">
|
class="two wide column control">
|
||||||
<i :class="['ui', 'trash', 'secondary', {'disabled': queue.tracks.length === 0}, 'icon']" ></i>
|
<i :class="['ui', 'trash', 'secondary', {'disabled': queue.tracks.length === 0}, 'icon']" ></i>
|
||||||
</a>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<GlobalEvents
|
<GlobalEvents
|
||||||
@keydown.space.prevent.exact="togglePlay"
|
@keydown.space.prevent.exact="togglePlay"
|
||||||
|
|
Loading…
Reference in New Issue