wvuweb / cleanslate-cms

A place to file issues and view releases for CleanSlate CMS. http://cleanslatecms.wvu.edu
6 stars 0 forks source link

Use semantic tags for bold and italic in Mercury #210

Open adamjohnson opened 8 years ago

adamjohnson commented 8 years ago

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 commented 6 years ago

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 commented 5 years ago

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?