GNU bug report logs -
#41031
Add facemenu-set-strong and facemenu-set-emphasis
Previous Next
Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Date: Sat, 2 May 2020 18:55:02 UTC
Severity: wishlist
Tags: patch
Found in versions 28.0.50, 26.3
Fixed in version 28.1
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
Message #12 received at control <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
tags 41031 + patch
found 41031 28.0.50
thanks
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:
> Just the other day I was editing an .html file, and noticed
>
> M-o b facemenu-set-bold
> M-o d facemenu-set-default
> M-o i facemenu-set-italic
> M-o l facemenu-set-bold-italic
> M-o o facemenu-set-face
> M-o u facemenu-set-underline
>
> hadn't been updated to also include "strong" and "em",
> which we are now supposed to use in preference to
> "<b>" (bold) and "<i>" (italic), that it currently only inserts.
Indeed, we should probably prefer those tags (even for HTML5). They
are also more accessible to people on screen readers.
Could you please test the attached patch and see that it resolves the
issue?
Best regards,
Stefan Kangas
[0001-Prefer-strong-and-em-to-b-and-i-in-html-mode.patch (text/x-diff, inline)]
From 5cc040b8552463db67aede1aa94d716e0a09e76a Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas <at> gmail.com>
Date: Mon, 4 May 2020 00:35:07 +0200
Subject: [PATCH] Prefer 'strong' and 'em' to 'b' and 'i' in html-mode
* lisp/textmodes/sgml-mode.el (html-face-tag-alist): Prefer inserting
the '<strong>' and '<em>' tags to '<b> and '<i>' in
html-mode. (Bug#41031)
* lisp/textmodes/sgml-mode.el (html-mode): Update docstring to do the
same.
---
lisp/textmodes/sgml-mode.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 9b29b844d0..b5ff6a6967 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -1852,8 +1852,8 @@ html-mode-map
"Keymap for commands for use in HTML mode.")
(defvar html-face-tag-alist
- '((bold . "b")
- (italic . "i")
+ '((bold . "strong")
+ (italic . "em")
(underline . "u")
(mode-line . "rev"))
"Value of `sgml-face-tag-alist' for HTML mode.")
@@ -2363,7 +2363,7 @@ html-mode
<p>Paragraphs only need an opening tag. Line breaks and multiple spaces are
ignored unless the text is <pre>preformatted.</pre> Text can be marked as
-<b>bold</b>, <i>italic</i> or <u>underlined</u> using the normal M-o or
+<strong>bold</strong>, <em>italic</em> or <u>underlined</u> using the normal M-o or
Edit/Text Properties/Face commands.
Pages can have <a name=\"SOMENAME\">named points</a> and can link other points
--
2.26.2
This bug report was last modified 5 years and 101 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.