Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use semantic tags for bold and italic in Mercury #210

Open
adamjohnson opened this issue Mar 31, 2016 · 2 comments
Open

Use semantic tags for bold and italic in Mercury #210

adamjohnson opened this issue Mar 31, 2016 · 2 comments
Assignees
Labels
feature request mercury editor Related to the Mercury WYSIWYG editor.

Comments

@adamjohnson
Copy link
Contributor

Steps to reproduce the issue

  1. Log in to CleanSlate.
  2. Go to a page and enter some text. Make parts bold and other parts italic.
  3. Click to view the HTML of that editable region.

Results

Bold tags use <b> and italic tags use <i>.

Expected results

Bold tags should use <strong> and italic tags should use <em> as these are more semantic.

This came from the Office of Accessibility Services folks who liaison with people who use screen readers. Apparently, screen reader users don't get notified when using <b> and <i>; however, they do get notified with <strong> and <em>.

CleanSlate (read: Mercury Editor) should use <strong> and <em> by default.


Related to #2 and https://stackoverflow.com/questions/271743/whats-the-difference-between-b-and-strong-i-and-em

@adamjohnson
Copy link
Contributor Author

Update:

Nathan made a change to CleanSlate so that CleanSlate outputs <strong> and <em> tags instead of <b> and <i>. (couldn't find the relevant commit, someone help a brother out).

However, we just received a report from a user that says Chrome on Windows outputs <b> instead of <strong> when using the hotkey.

Steps to reproduce the issue

  1. Use Windows. Log in to CleanSlate using Chrome.
  2. Go to a page and enter some text. Make parts bold using hotkeys (CTRL + B).
  3. View the HTML of that region

I made a video of this behavior.

Results

Bold tags use <b> instead of <strong>.

Expected Results

Same as original issue, see above.

Extra note: using hotkeys on Chrome on OSX outputs <strong>.

I did not test CTRL + I in Windows. It'd be worth testing that as well. My guess is the behavior would be the same as bold.

@bokster
Copy link

bokster commented Mar 1, 2019

Many users are copying and pasting from WORD and this results in <b> and <i> tags on the site. Is it possible to automagically convert <b> and <i> to <strong> and <em> when they hit publish?

@adamjohnson adamjohnson added the mercury editor Related to the Mercury WYSIWYG editor. label May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request mercury editor Related to the Mercury WYSIWYG editor.
Projects
None yet
Development

No branches or pull requests

3 participants