WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 5 months ago

#44777 new defect (bug)

Twenty Sixteen and Twenty Seventeen ignore/override ordered list types

Reported by: Greg Raven Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: reporter-feedback 2nd-opinion
Focuses: Cc:

Description

If you set up an ordered list in Twenty Sixteen or Twenty Seventeen, and then try to add a type to it, WordPress ignores the type. You can get only a numbered list.

Change History (4)

#1 @SergeyBiryukov
2 years ago

  • Component changed from General to Bundled Theme

#2 @subrataemfluence
2 years ago

  • Keywords reporter-feedback added

Can you please explain the steps for reproduction?

Is it like adding an ordered list via content editor and then applying a list-type via CSS?

If yes, please let us know about the following:

  1. WordPress version
  2. Content editor you are using (Classic or Gutenberg, since the latter is already available)
  3. If Gutenberg, please confirm whether the same is happening with the classic editor as well
  4. Testing WordPress core and bundled themes recommends that no additional plugins activated except bundled ones like Akismet and Hello Dolly. Please make sure you are testing on a fresh WordPress installation with twentysixteen or twentyseventeen activated.

Thanks!

#3 @Greg Raven
2 years ago

1) Either apply list styling to existing text, or import an HTML list.

2) Go into the Text view tab in the post editor page.

3) Manually type in a list type, e.g. <ol type="a">

I'm using WordPress 4.9.8 in Classic mode. This is a fresh install, using the Twenty Sixteen theme.

#4 @sabernhardt
5 months ago

  • Keywords 2nd-opinion added

To customize the list styling, it is usually better to use CSS than the type attribute:
<ol style="list-style-type: lower-alpha;">

TinyMCE Advanced is one plugin that can help add those styles to each new list, using the Visual editor.

Though there is no editor support in WordPress core to set the type attribute, it may be worth adding theme support for when lists have that attribute. MDN mentions the case of assigning the type to lists in a legal or technical document, where the type conveys a specific meaning for reference.

Twenty Sixteen and Twenty Seventeen both set the style for ordered lists to decimal, even when they are nested (Twenty Twenty is one theme that styles nested ordered lists with letters and/or Roman numerals). If that rule is simply removed, then the styling would use the browser default, which is typically decimal anyway for English browsers. And default styling would honor the type. Another, probably less advisable, option to support it would be using ol:not([type]).

Note: See TracTickets for help on using tickets.