From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EFZZHQQthF+zUAAA0tVLHw (envelope-from ) for ; Mon, 12 Oct 2020 10:16:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id gI1CGQQthF8fcAAAbx9fmQ (envelope-from ) for ; Mon, 12 Oct 2020 10:16:36 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 26B109401D0 for ; Mon, 12 Oct 2020 10:16:36 +0000 (UTC) Received: from localhost ([::1]:49900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRusd-0004pG-1Q for larch@yhetil.org; Mon, 12 Oct 2020 06:16:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRuhl-0008Po-T6 for emacs-orgmode@gnu.org; Mon, 12 Oct 2020 06:05:22 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:55589) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRuhk-0003Xn-0Y for emacs-orgmode@gnu.org; Mon, 12 Oct 2020 06:05:21 -0400 X-Originating-IP: 213.207.159.14 Received: from kronos (unknown [213.207.159.14]) (Authenticated sender: public@protesilaos.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 5700E60002 for ; Mon, 12 Oct 2020 10:05:15 +0000 (UTC) From: Protesilaos Stavrou To: emacs-orgmode@gnu.org Subject: [PATCH] Review face for export dispatcher highlighted keys Date: Mon, 12 Oct 2020 13:05:13 +0300 Message-ID: <87blh7n4iu.fsf@protesilaos.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: none client-ip=217.70.183.195; envelope-from=info@protesilaos.com; helo=relay3-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/12 06:05:17 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 3.29 X-TUID: zgOww3euZ1Ng --=-=-= Content-Type: text/plain The export dispatcher's active keys are highlighted using the 'org-warning' face. That face is applied in various contexts, including the agenda. Users who have difficulty reading the active keys of the export dispatcher are therefore forced to modify 'org-warning' throughout their setup, even though their problem is present only while viewing the dispatch UI (because highlighted keys are one or a few characters long). The attached patch is an attempt to address this issue by creating a new face that is specifically designed for the dispatch UI. For the background+foreground combinations, the selected values conform with the highest accessibility standard for colour contrast (WCAG AAA, else a minimum contrast ratio of 7:1). I limited my options to what 'M-x list-colors-display' provides. Best regards, Protesilaos -- Protesilaos Stavrou protesilaos.com --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Review-face-for-export-dispatcher-highlighted-keys.patch >From 317eecf00b8c7d7112706b2438796f2aa4c48ecd Mon Sep 17 00:00:00 2001 From: Protesilaos Stavrou Date: Mon, 12 Oct 2020 12:41:31 +0300 Subject: [PATCH] Review face for export dispatcher highlighted keys * lisp/org-faces.el (org-dispatcher-highlight): Define new face. * lisp/ox.el (org-export--dispatch-ui): Apply org-dispatcher-highlight face. The intent is to decouple the dispatcher's interface from the generic org-warning face. The dispatcher's active keys are thus made easier to tell apart, without interfering with other applications of org-warning. --- lisp/org-faces.el | 14 ++++++++++++++ lisp/ox.el | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lisp/org-faces.el b/lisp/org-faces.el index c0556b8bb..94b283ad6 100644 --- a/lisp/org-faces.el +++ b/lisp/org-faces.el @@ -45,6 +45,20 @@ The foreground color of this face should be equal to the background color of the frame." :group 'org-faces) +(defface org-dispatcher-highlight + '((default :weight bold) + (((class color) (min-colors 88) (background dark)) + :background "gray20" :foreground "gold1") + (((class color) (min-colors 88) (background light)) + :background "SlateGray1" :foreground "DarkBlue") + (((class color) (min-colors 16) (background dark)) + :foreground "yellow") + (((class color) (min-colors 16) (background light)) + :foreground "blue") + (t :inverse-video t)) + "Face for highlighted keys in the dispatcher." + :group 'org-faces) + (defface org-level-1 '((t :inherit outline-1)) "Face used for level 1 headlines." :group 'org-faces) diff --git a/lisp/ox.el b/lisp/ox.el index 6dd2cd4a0..5ffd66816 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -6706,7 +6706,7 @@ back to standard interface." ;; on the first key, if any. A nil value means KEY will ;; only be activated at first level. (if (or (eq access-key t) (eq access-key first-key)) - (propertize key 'face 'org-warning) + (propertize key 'face 'org-dispatcher-highlight) key))) (fontify-value (lambda (value) -- 2.28.0 --=-=-=--