From 0ac9601a3a400aaa4fd53af176c28f76c606d311 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Thu, 21 Nov 2019 00:16:58 +0200 Subject: [PATCH] Remove some data attributes --- client/components/ChannelWrapper.vue | 2 -- client/components/Chat.vue | 3 --- client/components/DateMarker.vue | 2 +- client/components/NetworkList.vue | 2 -- client/css/style.css | 2 +- client/js/keybinds.js | 4 +++- 6 files changed, 5 insertions(+), 10 deletions(-) diff --git a/client/components/ChannelWrapper.vue b/client/components/ChannelWrapper.vue index a4142f8e..c7d1ffd4 100644 --- a/client/components/ChannelWrapper.vue +++ b/client/components/ChannelWrapper.vue @@ -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" diff --git a/client/components/Chat.vue b/client/components/Chat.vue index d210eaed..07c5005a 100644 --- a/client/components/Chat.vue +++ b/client/components/Chat.vue @@ -2,7 +2,6 @@
diff --git a/client/components/DateMarker.vue b/client/components/DateMarker.vue index 4c1e5c1c..eacef30f 100644 --- a/client/components/DateMarker.vue +++ b/client/components/DateMarker.vue @@ -1,7 +1,7 @@ diff --git a/client/components/NetworkList.vue b/client/components/NetworkList.vue index 16fea14f..c10e2f8d 100644 --- a/client/components/NetworkList.vue +++ b/client/components/NetworkList.vue @@ -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" > diff --git a/client/css/style.css b/client/css/style.css index 724b65ac..86233b5e 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -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; diff --git a/client/js/keybinds.js b/client/js/keybinds.js index 78f460bb..e1b0c850 100644 --- a/client/js/keybinds.js +++ b/client/js/keybinds.js @@ -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