From f6899785a970083666d240fef537b9947e1e6865 Mon Sep 17 00:00:00 2001 From: Erion Date: Sat, 25 Jan 2020 18:47:18 +0100 Subject: [PATCH] Fix ARIA for Editor/preview tabs. --- js/privatebin.js | 6 ++++++ tpl/bootstrap.php | 6 +++--- tpl/page.php | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/js/privatebin.js b/js/privatebin.js index dc02e8fd..3665d1b1 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -2205,6 +2205,9 @@ jQuery.PrivateBin = (function($, RawDeflate) { $messageEdit.addClass('active'); $messagePreview.removeClass('active'); + $('#messageedit').attr("aria-selected",true); + $('#messagepreview').attr("aria-selected",false); + PasteViewer.hide(); // reshow input @@ -2234,6 +2237,9 @@ jQuery.PrivateBin = (function($, RawDeflate) { $messageEdit.removeClass('active'); $messagePreview.addClass('active'); + $('#messageedit').attr("aria-selected","false"); + $('#messagepreview').attr("aria-selected","true"); + // hide input as now preview is shown $message.addClass('hidden'); diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index a74e767b..e8fb5173 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -72,7 +72,7 @@ endif; ?> - + @@ -517,8 +517,8 @@ endif; ?>