Remove some data attributes

This commit is contained in:
Pavel Djundik 2019-11-21 00:16:58 +02:00
parent e76d5d2ef9
commit 0ac9601a3a
6 changed files with 5 additions and 10 deletions

View file

@ -11,8 +11,6 @@
]"
:aria-label="getAriaLabel()"
:title="getAriaLabel()"
:data-id="channel.id"
:data-target="'#chan-' + channel.id"
:data-name="channel.name"
:aria-controls="'#chan-' + channel.id"
:aria-selected="activeChannel && channel === activeChannel.channel"

View file

@ -2,7 +2,6 @@
<div id="chat-container" class="window" :data-current-channel="channel.name">
<div
id="chat"
:data-id="channel.id"
:class="{
'hide-motd': !$store.state.settings.motd,
'colored-nicks': $store.state.settings.coloredNicks,
@ -12,8 +11,6 @@
<div
:id="'chan-' + channel.id"
:class="[channel.type, 'chan', 'active']"
:data-id="channel.id"
:data-type="channel.type"
:aria-label="channel.name"
role="tabpanel"
>

View file

@ -1,7 +1,7 @@
<template>
<div :aria-label="localeDate" class="date-marker-container tooltipped tooltipped-s">
<div class="date-marker">
<span :data-label="friendlyDate()" class="date-marker-text" />
<span :aria-label="friendlyDate()" class="date-marker-text" />
</div>
</div>
</template>

View file

@ -26,8 +26,6 @@
'not-connected': !network.status.connected,
'not-secure': !network.status.secure,
}"
:data-uuid="network.uuid"
:data-nick="network.nick"
class="network"
role="region"
>

View file

@ -1234,7 +1234,7 @@ background on hover (unless active) */
}
#chat .date-marker-text::before {
content: attr(data-label);
content: attr(aria-label);
background-color: var(--window-bg-color);
color: var(--date-marker-color);
padding: 0 10px;

View file

@ -97,7 +97,9 @@ Mousetrap.bind(["alt+a"], function() {
function jumpToChannel(targetChannel) {
switchToChannel(targetChannel);
scrollIntoViewNicely(document.querySelector(`#sidebar .chan[data-id="${targetChannel.id}"]`));
scrollIntoViewNicely(
document.querySelector(`#sidebar .chan[aria-controls="#chan-${targetChannel.id}"]`)
);
}
// Ignored keys which should not automatically focus the input bar